]> git.seodisparate.com - RockPaperScissorsDuel/commitdiff
Fix native build
authorStephen Seo <seo.disparate@gmail.com>
Mon, 2 Jan 2023 05:08:28 +0000 (14:08 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Mon, 2 Jan 2023 05:08:28 +0000 (14:08 +0900)
CMakeLists.txt
src/main.cc

index e6465aa4397b54be7fd9307758eae4df914490b1..02fd6d41af430bb410267b02730a9aa876f97c41 100644 (file)
@@ -16,6 +16,7 @@ endif()
 
 set(RPSDuelNative_SOURCES
     src/main.cc
+    src/game.cc
 )
 
 add_executable(RPSDuelNative ${RPSDuelNative_SOURCES})
index 82f676e88a134c64e458c0dc41dd4bdab8a5e4c9..c90ddccb13f7302466f767d09dc795b83efec78b 100644 (file)
@@ -54,9 +54,10 @@ int main() {
 #endif
 
   Game game{};
-  global_game_ptr = &game;
 
 #ifdef __EMSCRIPTEN__
+  global_game_ptr = &game;
+
   SetWindowSize(call_js_get_canvas_width(), call_js_get_canvas_height());
 
   emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, false,