Fixed the throttle in the wx build

This commit is contained in:
skidau 2015-04-23 13:56:22 +00:00
parent c30ce554ef
commit b729a75012
5 changed files with 15 additions and 6 deletions

View File

@ -239,7 +239,7 @@ void DirectSound::write(u16 * finalWave, int length)
LPVOID lpvPtr2; LPVOID lpvPtr2;
DWORD dwBytes2 = 0; DWORD dwBytes2 = 0;
if( !speedup && synchronize && !gopts.throttle ) { if (!speedup && synchronize && !gopts.throttle && !gba_joybus_active) {
hr = dsbSecondary->GetStatus(&status); hr = dsbSecondary->GetStatus(&status);
if( status & DSBSTATUS_PLAYING ) { if( status & DSBSTATUS_PLAYING ) {
if( !soundPaused ) { if( !soundPaused ) {

View File

@ -290,7 +290,7 @@ void OpenAL::write(u16 * finalWave, int length)
} }
} }
if( !speedup && synchronize && !gopts.throttle ) { if (!speedup && synchronize && !gopts.throttle && !gba_joybus_active) {
// wait until at least one buffer has finished // wait until at least one buffer has finished
while( nBuffersProcessed == 0 ) { while( nBuffersProcessed == 0 ) {
winlog( " waiting...\n" ); winlog( " waiting...\n" );

View File

@ -907,7 +907,7 @@ bool systemCanChangeSoundQuality()
if(panel) if(panel)
return !panel->IsRecording(); return !panel->IsRecording();
#endif #endif
return true; return wxGetApp().IsMainLoopRunning();
} }
bool systemPauseOnFrame() bool systemPauseOnFrame()
@ -1135,7 +1135,9 @@ void log(const char *defaultMsg, ...)
vsnprintf(buf, 2048, defaultMsg, valist); vsnprintf(buf, 2048, defaultMsg, valist);
va_end(valist); va_end(valist);
wxGetApp().log.append(wxString(buf, wxConvLibc)); wxGetApp().log.append(wxString(buf, wxConvLibc));
if (wxGetApp().IsMainLoopRunning()) {
LogDialog *d = wxGetApp().frame->logdlg; LogDialog *d = wxGetApp().frame->logdlg;
if(d) if(d)
d->Update(); d->Update();
}
} }

View File

@ -20,6 +20,7 @@
// The built-in vba-over.ini // The built-in vba-over.ini
#include "builtin-over.h" #include "builtin-over.h"
#include "common/ConfigManager.h"
IMPLEMENT_APP(wxvbamApp) IMPLEMENT_APP(wxvbamApp)
IMPLEMENT_DYNAMIC_CLASS(MainFrame, wxFrame) IMPLEMENT_DYNAMIC_CLASS(MainFrame, wxFrame)
@ -388,6 +389,11 @@ bool wxvbamApp::OnCmdLineParsed(wxCmdLineParser &cl)
} }
} }
} }
home = strdup((const char*)argv[0].mb_str(wxConvUTF8));
SetHome(home);
LoadConfig(); // Parse command line arguments (overrides ini)
ReadOpts(argc, argv);
return true; return true;
} }

View File

@ -97,6 +97,7 @@ public:
} }
private: private:
wxPathList config_path; wxPathList config_path;
char* home;
}; };
DECLARE_APP(wxvbamApp); DECLARE_APP(wxvbamApp);