back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/menu_callbacks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'menu_callbacks.cpp')
-rw-r--r--menu_callbacks.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/menu_callbacks.cpp b/menu_callbacks.cpp
index ffc1aae..5668c67 100644
--- a/menu_callbacks.cpp
+++ b/menu_callbacks.cpp
@@ -1,3 +1,4 @@
+#include <FL/Fl.H>
#include <FL/Fl_Native_File_Chooser.H>
#include <FL/fl_message.H>
#include <memory>
@@ -11,6 +12,7 @@
void new_game_callback(Fl_Widget*, void *gp)
{
+ Fl::check();
PuzzleGame::StartGame(reinterpret_cast<GameParams*>(gp));
}
@@ -30,7 +32,7 @@ void load_file_callback(Fl_Widget *sender, void*)
dialog.type(Fl_Native_File_Chooser::BROWSE_FILE);
dialog.filter("JPEG Files\t*.jpg\nPNG Files\t*.png");
#if defined(_WIN32)
- dialog.directory((string {getenv("HOMEPATH")} + "\\Desktop").c_str());
+ dialog.directory((std::string {getenv("HOMEPATH")} + "\\Desktop").c_str());
#else
dialog.directory((std::string {getenv("HOME")} + "/Desktop").c_str());
#endif