summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSonicadvance1 <sonicadvance1@gmail.com>2010-02-19 18:32:40 +0000
committerSonicadvance1 <sonicadvance1@gmail.com>2010-02-19 18:32:40 +0000
commitf9f9b1bc145f3266a9a591db983ca7ca6a9ea44d (patch)
treedde4fa3c25be2d4e55d4ac74ad56104362c1db9f /Source
parent3a5a7de90601038570001c75d47a142e0642a7b5 (diff)
No message
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5083 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/Src/Frame.cpp9
-rw-r--r--Source/Core/DolphinWX/Src/MainNoGUI.cpp21
2 files changed, 16 insertions, 14 deletions
diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp
index ab4a411e5f..56d42be01d 100644
--- a/Source/Core/DolphinWX/Src/Frame.cpp
+++ b/Source/Core/DolphinWX/Src/Frame.cpp
@@ -395,12 +395,9 @@ CFrame::CFrame(wxFrame* parent,
// ---------------
// Manager
-#ifdef _WIN32
+ // wxAUI_MGR_LIVE_RESIZE does not exist in the wxWidgets 2.8.9 that comes with Ubuntu 9.04
+ // Could just check for wxWidgets version if it becomes a problem.
m_Mgr = new wxAuiManager(this, wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE);
-#else
- // wxAUI_MGR_LIVE_RESIZE does not exist in the wxWidgets 2.8 that comes with the latest ubuntu.
- m_Mgr = new wxAuiManager(this, wxAUI_MGR_DEFAULT);
-#endif
NOTEBOOK_STYLE = wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_WINDOWLIST_BUTTON | wxNO_BORDER;
TOOLBAR_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_TEXT /*wxAUI_TB_OVERFLOW overflow visible*/;
wxBitmap aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
@@ -500,7 +497,7 @@ CFrame::CFrame(wxFrame* parent,
//if we are ever going back to optional iso caching:
//m_GameListCtrl->Update(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableIsoCache);
- if (m_GameListCtrl) m_GameListCtrl->Update();
+ //if (m_GameListCtrl) m_GameListCtrl->Update();
// If we are rerecording create the status bar now instead of later when a game starts
#ifdef RERECORDING
diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp
index e7e82277da..344cd4e1db 100644
--- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp
+++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp
@@ -117,10 +117,12 @@ void Host_SetWiiMoteConnectionState(int _State) {}
@interface CocoaThread : NSObject
{
+ NSThread *Thread;
}
- (void)cocoaThreadStart;
- (void)cocoaThreadRun:(id)sender;
- (void)cocoaThreadQuit:(NSNotification*)note;
+- (bool)cocoaThreadRunning;
@end
static NSString *CocoaThreadHaveFinish = @"CocoaThreadHaveFinish";
@@ -143,7 +145,7 @@ int appleMain(int argc, char *argv[]);
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
+ Thread = [NSThread currentThread];
//launch main
appleMain(cocoaArgc,cocoaArgv);
@@ -160,12 +162,17 @@ int appleMain(int argc, char *argv[]);
}
+- (bool)cocoaThreadRunning
+{
+ if([Thread isFinished])
+ return false;
+ else
+ return true;
+}
@end
-volatile bool running;
-
int main(int argc, char *argv[])
{
@@ -180,10 +187,9 @@ int main(int argc, char *argv[])
NSEvent *event = [[NSEvent alloc] init];
[thread cocoaThreadStart];
- running = true;
//cocoa event loop
- while(running)
+ while(1)
{
event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES ];
if(cocoaSendEvent(event))
@@ -191,6 +197,8 @@ int main(int argc, char *argv[])
Core::Stop();
break;
}
+ if(![thread cocoaThreadRunning])
+ break;
}
@@ -238,9 +246,6 @@ int main(int argc, char* argv[])
updateMainFrameEvent.Wait();
}
}
-#if defined(HAVE_COCOA) && HAVE_COCOA
- running = false;
-#endif
CPluginManager::Shutdown();
SConfig::Shutdown();