Split Linux platform target and move runtime/platform state
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user