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->BootDone();
host->UpdateDisassembly(); host->UpdateDisassembly();
#ifdef _WIN32
if (g_Config.bAutoRun) {
Core_EnableStepping(false);
} else {
Core_EnableStepping(true);
}
#endif
LayoutGamepad(dp_xres, dp_yres); LayoutGamepad(dp_xres, dp_yres);
NOTICE_LOG(BOOT, "Loading %s...", fileToStart.c_str()); NOTICE_LOG(BOOT, "Loading %s...", fileToStart.c_str());

View file

@ -138,7 +138,10 @@ void WindowsHost::PollControllers(InputState &input_state)
void WindowsHost::BootDone() void WindowsHost::BootDone()
{ {
symbolMap.SortSymbols(); 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) static std::string SymbolMapFilename(const char *currentFilename)

View file

@ -49,7 +49,6 @@ namespace MainWindow
HWND hwndDisplay; HWND hwndDisplay;
HWND hwndGameList; HWND hwndGameList;
static HMENU menu; static HMENU menu;
static CoreState nextState = CORE_POWERDOWN;
static HINSTANCE hInst; static HINSTANCE hInst;
@ -657,14 +656,6 @@ namespace MainWindow
if (memoryWindow[0]) if (memoryWindow[0])
memoryWindow[0]->NotifyMapLoaded(); 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); SetForegroundWindow(hwndMain);
break; break;
@ -892,11 +883,6 @@ namespace MainWindow
SetCursor(LoadCursor(0, IDC_ARROW)); SetCursor(LoadCursor(0, IDC_ARROW));
} }
void SetNextState(CoreState state)
{
nextState = state;
}
HINSTANCE GetHInstance() HINSTANCE GetHInstance()
{ {
return hInst; return hInst;

View file

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