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();