Actually respect autorun on Windows.

Fixes #1179.
This commit is contained in:
Unknown W. Brackets 2013-04-05 00:57:43 -07:00
parent 169d04d3ad
commit fd0a422d89
4 changed files with 4 additions and 24 deletions

View File

@ -83,14 +83,6 @@ EmuScreen::EmuScreen(const std::string &filename) : invalid_(true) {
host->BootDone();
host->UpdateDisassembly();
#ifdef _WIN32
if (g_Config.bAutoRun) {
Core_EnableStepping(false);
} else {
Core_EnableStepping(true);
}
#endif
LayoutGamepad(dp_xres, dp_yres);
NOTICE_LOG(BOOT, "Loading %s...", fileToStart.c_str());

View File

@ -138,7 +138,10 @@ void WindowsHost::PollControllers(InputState &input_state)
void WindowsHost::BootDone()
{
symbolMap.SortSymbols();
PostMessage(MainWindow::GetHWND(), WM_USER+1, 0,0);
SendMessage(MainWindow::GetHWND(), WM_USER+1, 0,0);
SetDebugMode(!g_Config.bAutoRun);
Core_EnableStepping(!g_Config.bAutoRun);
}
static std::string SymbolMapFilename(const char *currentFilename)

View File

@ -49,7 +49,6 @@ namespace MainWindow
HWND hwndDisplay;
HWND hwndGameList;
static HMENU menu;
static CoreState nextState = CORE_POWERDOWN;
static HINSTANCE hInst;
@ -657,14 +656,6 @@ namespace MainWindow
if (memoryWindow[0])
memoryWindow[0]->NotifyMapLoaded();
if (nextState == CORE_RUNNING)
PostMessage(hwndMain, WM_COMMAND, ID_EMULATION_RUN, 0);
else if (globalUIState == UISTATE_INGAME)
{
if (disasmWindow[0])
SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_GO, 0);
}
SetForegroundWindow(hwndMain);
break;
@ -892,11 +883,6 @@ namespace MainWindow
SetCursor(LoadCursor(0, IDC_ARROW));
}
void SetNextState(CoreState state)
{
nextState = state;
}
HINSTANCE GetHInstance()
{
return hInst;

View File

@ -18,7 +18,6 @@ namespace MainWindow
HWND GetDisplayHWND();
void SetPlaying(const char*text);
void BrowseAndBoot(std::string defaultPath);
void SetNextState(CoreState state);
void SaveStateActionFinished(bool result, void *userdata);
void _ViewFullScreen(HWND hWnd);
void _ViewNormal(HWND hWnd);