summaryrefslogtreecommitdiff
path: root/navit/gui/win32
diff options
context:
space:
mode:
Diffstat (limited to 'navit/gui/win32')
-rw-r--r--navit/gui/win32/gui_win32.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/navit/gui/win32/gui_win32.c b/navit/gui/win32/gui_win32.c
index bf8c5b06c..4cab534fc 100644
--- a/navit/gui/win32/gui_win32.c
+++ b/navit/gui/win32/gui_win32.c
@@ -574,6 +574,17 @@ struct gui_methods win32_gui_methods = {
static struct gui_priv *win32_gui_new( struct navit *nav, struct gui_methods *meth, struct attr **attrs)
{
struct gui_priv *this_;
+#ifdef __CEGCC__
+ /* Do not run multiple instances under CE */
+ HWND prev;
+ prev = FindWindow(g_szClassName, NULL);
+ if (prev) {
+ ShowWindow(prev, SW_RESTORE);
+ SetForegroundWindow(prev);
+ InvalidateRect (prev, NULL, FALSE);
+ exit(0);
+ }
+#endif
*meth=win32_gui_methods;