summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uisimulator/win32/uisw32.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c
index 3cfa3ae..9a8351c 100644
--- a/uisimulator/win32/uisw32.c
+++ b/uisimulator/win32/uisw32.c
@@ -19,6 +19,8 @@
#include <windows.h>
#include <process.h>
+#include <stdlib.h>
+#include <fcntl.h>
#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;