Skip to content

Commit

Permalink
disable lua in hardcore
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Jun 13, 2019
1 parent 8f135f7 commit 9bf4905
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/drivers/win/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1917,6 +1917,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)

//Lua submenu
case ID_FILE_OPENLUAWINDOW:
#if RETROACHIEVEMENTS
if (!RA_WarnDisableHardcore("open lua windows"))
break;
#endif
if (!LuaConsoleHWnd)
{
LuaConsoleHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_LUA), hWnd, (DLGPROC) DlgLuaScriptDialog);
Expand Down
3 changes: 3 additions & 0 deletions src/retroachievements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern HWND hPPUView; // not in ppuview.h
extern void KillPPUView(); // not in ppuview.h
extern HWND hGGConv; // not in cheat.h
extern HWND hNTView; // not in ntview.h
extern HWND LuaConsoleHWnd; // not in fcelua.h

int FDS_GameId = 0;

Expand Down Expand Up @@ -115,6 +116,8 @@ static void ResetEmulator()
SendMessage(hCDLogger, WM_CLOSE, NULL, NULL);
if (hGGConv)
SendMessage(hGGConv, WM_CLOSE, NULL, NULL);
if (LuaConsoleHWnd)
PostMessage(LuaConsoleHWnd, WM_CLOSE, 0, 0);

// disable any active cheats
FCEU_FlushGameCheats(0, 1);
Expand Down

0 comments on commit 9bf4905

Please sign in to comment.