Split Linux platform target and move runtime/platform state

This commit is contained in:
2026-06-17 01:20:11 +02:00
parent 90a55b86fe
commit 3ce365fc15
16 changed files with 169 additions and 94 deletions

View File

@@ -5,6 +5,7 @@
#include <thread>
#include <chrono>
#include <app.h>
#include <platform_legacy/legacy_platform_state.h>
#include <fstream>
#include <keymap.h>
@@ -117,11 +118,11 @@ void CanvasOnWheel(float y)
void StartApp()
{
App::I = &app;
pp::platform::legacy::set_legacy_glfw_window(wnd);
app.initLog();
app.create();
app.width = 1024;
app.height = 768;
app.glfw_window = wnd;
// app.render_thread_tick();
// app.ui_thread_tick();
@@ -240,9 +241,9 @@ int main()
});
});
glfwSetWindowCloseCallback(wnd, [](GLFWwindow* wnd){
app.ui_task([] {
app.ui_task([wnd] {
if (!app.request_close())
glfwSetWindowShouldClose(app.glfw_window, GLFW_FALSE);
glfwSetWindowShouldClose(wnd, GLFW_FALSE);
});
});
glfwSetWindowRefreshCallback(wnd, [](GLFWwindow* wnd){