mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-11-11 17:03:15 +03:00
feat(app): add windows app
This commit is contained in:
1 parent
6bebfe5e2f
commit
655d795a9d
20 files changed
+176
-66
No files matched your search
+9
-4
@@ -9,6 +9,10 @@
|
||||
#include <tempest/Rect.hpp>
|
||||
#include <tempest/Vector.hpp>
|
||||
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
#include "app/mac/MacClient.h"
|
||||
#endif
|
||||
@@ -327,7 +331,7 @@ void ConvertPosition(int32_t clientx, int32_t clienty, float* x, float* y) {
|
||||
}
|
||||
}
|
||||
|
||||
tagRECT windowDim;
|
||||
RECT windowDim;
|
||||
OsGetDefaultWindowRect(&windowDim);
|
||||
|
||||
*x = static_cast<float>(clientx) / static_cast<float>(windowDim.right - windowDim.left);
|
||||
@@ -565,6 +569,7 @@ const char* KeyCodeToString(KEY key) {
|
||||
int32_t OsInputGet(OSINPUT* id, int32_t* param0, int32_t* param1, int32_t* param2, int32_t* param3) {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
// TODO
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
@@ -592,9 +597,9 @@ int32_t OsInputGet(OSINPUT* id, int32_t* param0, int32_t* param1, int32_t* param
|
||||
void OsInputInitialize() {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
Input::s_numlockState = GetAsyncKeyState(144);
|
||||
PVOID pvParam = 10;
|
||||
SystemParametersInfoA(SPI_GETMOUSESPEED, 0, &pvParam, 0);
|
||||
Input::s_savedMouseSpeed = pvParam;
|
||||
int32_t mouseSpeed = 10;
|
||||
SystemParametersInfoA(SPI_GETMOUSESPEED, 0, &mouseSpeed, 0);
|
||||
Input::s_savedMouseSpeed = mouseSpeed;
|
||||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
|
||||
@@ -134,7 +134,7 @@ void IEvtSchedulerProcess() {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
Event::s_startEvent.Set();
|
||||
|
||||
SchedulerThreadProc(1);
|
||||
SchedulerThreadProc(reinterpret_cast<void*>(1));
|
||||
|
||||
Event::s_mainThread = 0;
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user