This commit is contained in:
parent
6d5256e0ec
commit
3f455d0ca7
3 changed files with 16 additions and 23 deletions
|
|
@ -133,6 +133,8 @@ if(WIN32)
|
|||
logger
|
||||
lt_debug
|
||||
time
|
||||
TESTS
|
||||
system.test.cpp
|
||||
)
|
||||
|
||||
elseif(UNIX)
|
||||
|
|
@ -151,9 +153,9 @@ elseif(UNIX)
|
|||
math
|
||||
memory
|
||||
input_codes
|
||||
wayland-client
|
||||
PRIVATE_DEPENDENCIES
|
||||
X11
|
||||
wayland-client
|
||||
logger
|
||||
lt_debug
|
||||
time
|
||||
|
|
@ -161,7 +163,6 @@ elseif(UNIX)
|
|||
system.test.cpp
|
||||
)
|
||||
|
||||
|
||||
function(add_wayland_protocol_target TARGET_NAME SPEC NAME)
|
||||
add_custom_target(wayland_${TARGET_NAME}_header COMMAND wayland-scanner client-header /usr/share/wayland-protocols${SPEC} ${CMAKE_CURRENT_SOURCE_DIR}/surface/wayland-protocols/${NAME}.h)
|
||||
add_dependencies(surface wayland_${TARGET_NAME}_header)
|
||||
|
|
@ -218,7 +219,6 @@ add_module(
|
|||
vk/debugger.cppm
|
||||
DEPENDENCIES
|
||||
app
|
||||
wayland-client
|
||||
ecs
|
||||
memory
|
||||
assets
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ module;
|
|||
#if defined(LIGHT_PLATFORM_LINUX)
|
||||
#include <wayland-client.h>
|
||||
#include <xdg-shell.h>
|
||||
#elif defined(LIGHT_PLATFORM_WINDOWS)
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
|
@ -17,6 +19,16 @@ import memory.reference;
|
|||
import memory.null_on_move;
|
||||
import logger;
|
||||
import std;
|
||||
import surface.constants;
|
||||
import debug.assertions;
|
||||
import memory.reference;
|
||||
import surface.requests;
|
||||
import surface.events;
|
||||
import logger;
|
||||
import ecs.registry;
|
||||
import ecs.entity;
|
||||
import time;
|
||||
import std;
|
||||
|
||||
export namespace lt::surface {
|
||||
|
||||
|
|
@ -184,7 +196,7 @@ private:
|
|||
module :private;
|
||||
namespace lt::surface {
|
||||
|
||||
#ifdef LIGHT_PLATFORM_LINUX
|
||||
#if defined(LIGHT_PLATFORM_LINUX)
|
||||
|
||||
void handle_shell_ping(void *data, xdg_wm_base *shell, std::uint32_t serial)
|
||||
{
|
||||
|
|
@ -514,22 +526,6 @@ void System::tick(app::TickInfo tick)
|
|||
|
||||
#ifdef LIGHT_PLATFORM_WINDOWS
|
||||
|
||||
module;
|
||||
#include <Windows.h>
|
||||
module surface.system;
|
||||
import surface.constants;
|
||||
import debug.assertions;
|
||||
import memory.reference;
|
||||
import surface.requests;
|
||||
import surface.events;
|
||||
import logger;
|
||||
import ecs.registry;
|
||||
import ecs.entity;
|
||||
import time;
|
||||
import std;
|
||||
|
||||
namespace lt::surface {
|
||||
|
||||
template<class... Ts>
|
||||
struct overloads: Ts...
|
||||
{
|
||||
|
|
@ -1038,7 +1034,6 @@ auto CALLBACK native_window_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||
return DefWindowProcA(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
} // namespace lt::surface
|
||||
#endif
|
||||
|
||||
} // namespace lt::surface
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ private:
|
|||
System m_system { m_registry };
|
||||
};
|
||||
|
||||
|
||||
Suite raii = "raii"_suite = [] {
|
||||
Case { "happy path won't throw" } = [] {
|
||||
auto fixture = Fixture {};
|
||||
|
|
@ -99,7 +98,6 @@ Suite raii = "raii"_suite = [] {
|
|||
{
|
||||
system.tick({});
|
||||
}
|
||||
|
||||
lt::log::trace("Three seconds passed, quitting...");
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue