mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-11-27 16:12:13 +03:00
feat(event): pass custom window proc in gx device creation
This commit is contained in:
1 parent
9ccd1884f3
commit
32f9c81abf
6 files changed
+41
-1
No files matched your search
@@ -1,4 +1,5 @@
|
|||||||
#include "client/Console.hpp"
|
#include "client/Console.hpp"
|
||||||
|
#include "event/Window.hpp"
|
||||||
#include "gx/Device.hpp"
|
#include "gx/Device.hpp"
|
||||||
#include "util/CVar.hpp"
|
#include "util/CVar.hpp"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@@ -200,7 +201,7 @@ void ConsoleDeviceInitialize(const char* title) {
|
|||||||
api = GxApi_GLL;
|
api = GxApi_GLL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGxDevice* device = GxDevCreate(api, nullptr, format);
|
CGxDevice* device = GxDevCreate(api, OsWindowProc, format);
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
file(GLOB PRIVATE_SOURCES "*.cpp")
|
file(GLOB PRIVATE_SOURCES "*.cpp")
|
||||||
|
|
||||||
|
if(WHOA_SYSTEM_WIN)
|
||||||
|
file(GLOB WIN_SOURCES
|
||||||
|
"win/*.cpp"
|
||||||
|
)
|
||||||
|
list(APPEND PRIVATE_SOURCES ${WIN_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WHOA_SYSTEM_MAC)
|
if(WHOA_SYSTEM_MAC)
|
||||||
file(GLOB MAC_SOURCES
|
file(GLOB MAC_SOURCES
|
||||||
"mac/*.cpp"
|
"mac/*.cpp"
|
||||||
@@ -8,6 +15,13 @@ if(WHOA_SYSTEM_MAC)
|
|||||||
list(APPEND PRIVATE_SOURCES ${MAC_SOURCES})
|
list(APPEND PRIVATE_SOURCES ${MAC_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WHOA_SYSTEM_LINUX)
|
||||||
|
file(GLOB LINUX_SOURCES
|
||||||
|
"linux/*.cpp"
|
||||||
|
)
|
||||||
|
list(APPEND PRIVATE_SOURCES ${LINUX_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(event STATIC
|
add_library(event STATIC
|
||||||
${PRIVATE_SOURCES}
|
${PRIVATE_SOURCES}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#ifndef EVENT_WINDOW_HPP
|
||||||
|
#define EVENT_WINDOW_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
int32_t OsWindowProc(void* window, uint32_t message, uint32_t wparam, int32_t lparam);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#include "event/Window.hpp"
|
||||||
|
|
||||||
|
int32_t OsWindowProc(void* window, uint32_t message, uint32_t wparam, int32_t lparam) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#include "event/Window.hpp"
|
||||||
|
|
||||||
|
int32_t OsWindowProc(void* window, uint32_t message, uint32_t wparam, int32_t lparam) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "event/Window.hpp"
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
int32_t OsWindowProc(void* window, uint32_t message, uint32_t wparam, int32_t lparam) {
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user