1
0
Fork 0

Platform/Win32: remove Win32MsgBuffer

This commit is contained in:
Henrik Hautakoski 2020-02-01 16:43:10 +01:00
parent cdaed77bf7
commit c7c1ff68fd
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
3 changed files with 0 additions and 45 deletions

View file

@ -48,7 +48,6 @@ local platform_spec_module = Module("source/Platform/Win32", {
"Win32Misc.cpp",
"Win32Mouse.cpp",
"Win32EventQueue.cpp",
"Win32MsgBuffer.cpp",
"Win32System.cpp",
"glad_wgl.c"
})

View file

@ -1,22 +0,0 @@
#include <Spectre/System/Log.h>
#include "Win32MsgBuffer.h"
namespace sp {
Win32MsgBuffer::Win32MsgBuffer() :
index (0)
{
}
bool Win32MsgBuffer::postMessage(MSG msg)
{
if (index < WIN32_MSG_BUFFER_MAX_SIZE) {
messages[index++] = msg;
return true;
}
Log::warn("Win32MsgBuffer: Queue overflow\n");
return false;
}
} // namespace sp

View file

@ -1,22 +0,0 @@
#ifndef PLATFORM_WIN32_MSG_BUFFER_H
#define PLATFORM_WIN32_MSG_BUFFER_H
#include <Windows.h>
namespace sp {
#define WIN32_MSG_BUFFER_MAX_SIZE 64
struct Win32MsgBuffer {
int index;
MSG messages[WIN32_MSG_BUFFER_MAX_SIZE];
Win32MsgBuffer();
bool postMessage(MSG msg);
};
} // namespace sp
#endif /* PLATFORM_WIN32_MSG_BUFFER_H */