diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp index a2e2308d82..ee46dac345 100644 --- a/Source/Core/Common/Src/MemoryUtil.cpp +++ b/Source/Core/Common/Src/MemoryUtil.cpp @@ -48,7 +48,7 @@ void* AllocateExecutableMemory(size_t size, bool low) if (ptr == NULL) PanicAlert("Failed to allocate executable memory"); - if ((u64)ptr >= 0x80000000) + if ((u64)ptr >= 0x80000000 && low == true) PanicAlert("Executable memory ended up above 2GB!"); return ptr; diff --git a/Source/Core/Common/Src/Version.cpp b/Source/Core/Common/Src/Version.cpp index 91b7597ccf..7e271453d3 100644 --- a/Source/Core/Common/Src/Version.cpp +++ b/Source/Core/Common/Src/Version.cpp @@ -19,11 +19,11 @@ #include "svnrev.h" #ifdef _DEBUG -const char *svn_rev_str = "Dolphin Debug SVN R " SVN_REV_STR; +const char *svn_rev_str = "Dolphin Debug SVN r" SVN_REV_STR; #elif defined DEBUGFAST -const char *svn_rev_str = "Dolphin Debugfast SVN R " SVN_REV_STR; +const char *svn_rev_str = "Dolphin Debugfast SVN r" SVN_REV_STR; #else -const char *svn_rev_str = "Dolphin SVN R " SVN_REV_STR; +const char *svn_rev_str = "Dolphin SVN r" SVN_REV_STR; #endif #ifdef _M_X64 diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 95cf257d13..6b30411809 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -241,8 +241,8 @@ void SConfig::LoadSettings() ini.Get("Display", "Fullscreen", &m_LocalCoreStartupParameter.bFullscreen, false); ini.Get("Display", "FullscreenResolution", &m_LocalCoreStartupParameter.strFullscreenResolution, "640x480"); ini.Get("Display", "RenderToMain", &m_LocalCoreStartupParameter.bRenderToMain, false); - ini.Get("Display", "RenderWindowXPos", &m_LocalCoreStartupParameter.iRenderWindowXPos, 0); - ini.Get("Display", "RenderWindowYPos", &m_LocalCoreStartupParameter.iRenderWindowYPos, 0); + ini.Get("Display", "RenderWindowXPos", &m_LocalCoreStartupParameter.iRenderWindowXPos, -1); + ini.Get("Display", "RenderWindowYPos", &m_LocalCoreStartupParameter.iRenderWindowYPos, -1); ini.Get("Display", "RenderWindowWidth", &m_LocalCoreStartupParameter.iRenderWindowWidth, 640); ini.Get("Display", "RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480); ini.Get("Display", "ProgressiveScan", &m_LocalCoreStartupParameter.bProgressive, false); diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 97d5b2fe8f..09e0c76dc0 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -671,14 +671,20 @@ void VideoThrottle() #endif // This is our final "frame counter" string - std::string SMessage = StringFromFormat("%s | %s", SSettings.c_str(), SFPS.c_str()); + std::string SMessage = StringFromFormat("%s | %s | %s", + svn_rev_str, SSettings.c_str(), SFPS.c_str()); // Show message if (g_pUpdateFPSDisplay != NULL) g_pUpdateFPSDisplay(SMessage.c_str()); - Host_UpdateTitle(SMessage.c_str()); - Host_UpdateStatusBar(SMessage.c_str()); + if (_CoreParameter.bRenderToMain && + SConfig::GetInstance().m_InterfaceStatusbar) { + Host_UpdateStatusBar(SMessage.c_str()); + Host_UpdateTitle(svn_rev_str); + } else + Host_UpdateTitle(SMessage.c_str()); + // Reset counter Timer.Update(); diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 5eaa0e1f68..550f906354 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -54,7 +54,7 @@ SCoreStartupParameter::SCoreStartupParameter() SelectedLanguage(0), bWii(false), bConfirmStop(false), bHideCursor(false), bAutoHideCursor(false), bUsePanicHandlers(true), - iRenderWindowXPos(0), iRenderWindowYPos(0), + iRenderWindowXPos(-1), iRenderWindowYPos(-1), iRenderWindowWidth(640), iRenderWindowHeight(480), bFullscreen(false), bRenderToMain(false), bProgressive(false), diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 423565ca16..ceb93aef3f 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -645,7 +645,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event) break; case IDM_UPDATETITLE: - if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && m_RenderFrame) + if (m_RenderFrame != NULL) m_RenderFrame->SetTitle(event.GetString()); break; diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index b2b216d09d..f0c6b45da3 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -785,9 +785,17 @@ void CFrame::StartGame(const std::string& filename) { wxPoint position(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos, SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos); +#ifdef __APPLE__ + // On OS X, the render window's title bar is not visible, + // and the window therefore not easily moved, when the + // position is 0,0. Weed out the 0's from existing configs. + if (position == wxPoint(0, 0)) + position = wxDefaultPosition; +#endif + + m_RenderFrame = new CRenderFrame((wxFrame*)this, wxID_ANY, _("Dolphin"), position); wxSize size(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth, SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight); - m_RenderFrame = new CRenderFrame((wxFrame*)this, wxID_ANY, _("Dolphin"), position); m_RenderFrame->SetClientSize(size.GetWidth(), size.GetHeight()); m_RenderFrame->Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler(CFrame::OnRenderParentClose), diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index 81e31407e5..1eb3043283 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -69,9 +69,10 @@ elif sys.platform == 'darwin' and env['HAVE_WX']: exeGUI = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin' env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' + - 'Library/Frameworks/Cg.framework', - source = [ '#Externals/Cg/Cg.framework/Cg', - '#Externals/Cg/Cg.framework/Resources' ]) + 'Library/Frameworks/Cg.framework', source = [ + '#Externals/Cg/Cg.framework/Cg', + '#Externals/Cg/Cg.framework/Resources' + ]) env.Install(env['data_dir'], '#Data/Sys') env.Install(env['data_dir'], '#Data/User') @@ -80,7 +81,7 @@ elif sys.platform == 'darwin' and env['HAVE_WX']: msgfmt = env.WhereIs('msgfmt') if not msgfmt == None: - po_files = Glob('#Languages/*.po', strings=True) + po_files = Glob('#Languages/*.po', strings = True) for po in po_files: index_lo = po.find('Languages/') + len('Languages/') index_hi = po.find('.po') @@ -108,6 +109,9 @@ elif sys.platform == 'darwin' and env['HAVE_WX']: LSMinimumSystemVersion = '10.5.4', LSRequiresCarbon = True, ))) + + env.Command('dummy', '#' + env['prefix'], + "find $SOURCES -name .svn -exec rm -rf {} +") else: files += [ 'X11Utils.cpp' ] libs += [ 'SDL' ] diff --git a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp index ac403cae20..afe0efc159 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp @@ -122,8 +122,8 @@ unsigned int Callback_PeekMessages() void UpdateFPSDisplay(const char *text) { - char temp[512]; - sprintf_s(temp, 512, "SVN R%s: DX11: %s", svn_rev_str, text); + char temp[100]; + sprintf_s(temp, sizeof temp, "%s | DX11 | %s", svn_rev_str, text); SetWindowTextA(EmuWindow::GetWnd(), temp); } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index d7ec2ae2d1..59bc0e74ad 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -120,8 +120,8 @@ unsigned int Callback_PeekMessages() void UpdateFPSDisplay(const char *text) { - TCHAR temp[512]; - swprintf_s(temp, 512, _T("SVN R%s: DX9: %hs"), svn_rev_str, text); + TCHAR temp[100]; + swprintf_s(temp, sizeof temp, _T("%s | DX9 | %s"), svn_rev_str, text); SetWindowText(EmuWindow::GetWnd(), temp); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index ed0748f9d5..cc2a4b92a6 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -66,7 +66,7 @@ u32 OpenGL_GetBackbufferHeight() void OpenGL_SetWindowText(const char *text) { #if defined(USE_WX) && USE_WX - // GLWin.frame->SetTitle(wxString::FromAscii(text)); + // Handled by Host_UpdateTitle() #elif defined(__APPLE__) [GLWin.cocoaWin setTitle: [[[NSString alloc] initWithCString: text] autorelease]]; diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp index 451a1de33e..6395505633 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp @@ -61,7 +61,7 @@ u32 OpenGL_GetBackbufferHeight() void OpenGL_SetWindowText(const char *text) { #if defined(USE_WX) && USE_WX - // GLWin.frame->SetTitle(wxString::FromAscii(text)); + // Handled by Host_UpdateTitle() #elif defined(_WIN32) // TODO convert text to unicode and change SetWindowTextA to SetWindowText SetWindowTextA(EmuWindow::GetWnd(), text);