diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c index 3cfa3aed7c..9a8351c3c5 100644 --- a/uisimulator/win32/uisw32.c +++ b/uisimulator/win32/uisw32.c @@ -19,6 +19,8 @@ #include #include +#include +#include #include "uisw32.h" #include "resource.h" #include "button.h" @@ -36,6 +38,8 @@ extern void new_key(int key); void button_event(int key, bool pressed); +extern int _fmode; + // variables HWND hGUIWnd; // the GUI window handle unsigned int uThreadID; // id of mod thread @@ -308,6 +312,9 @@ int WINAPI WinMain ( (void)lpCmd; (void)nShowCmd; + /* default file mode should be O_BINARY to be consistent with rockbox */ + _fmode = _O_BINARY; + if (!GUIStartup ()) return 0;