diff --git a/lua-engine.cpp b/lua-engine.cpp index bec6c353..8f75c22b 100644 --- a/lua-engine.cpp +++ b/lua-engine.cpp @@ -19,6 +19,7 @@ #ifdef __WIN32__ #define NOMINMAX #include +#include #include "win32/wsnes9x.h" #include "win32/render.h" @@ -4481,7 +4482,7 @@ void RunLuaScriptFile(int uid, const char* filenameCStr) static char dirnameCStr[MAX_PATH]; strcpy(dirnameCStr, filenameCStr); TrimFilenameFromPath(dirnameCStr); - chdir(dirnameCStr); + _chdir(dirnameCStr); if(info.running) { diff --git a/win32/COpenGL.cpp b/win32/COpenGL.cpp index 3e774c3b..66ce73f7 100644 --- a/win32/COpenGL.cpp +++ b/win32/COpenGL.cpp @@ -443,7 +443,9 @@ void COpenGL::Render(SSurface Src) if(!Settings.AutoDisplayMessages) { WinSetCustomDisplaySurface((void *)Dst.Surface, Dst.Pitch/2, dstRect.right-dstRect.left, dstRect.bottom-dstRect.top, GetFilterScale(CurrentScale)); S9xDisplayMessages ((uint16*)Dst.Surface, Dst.Pitch/2, dstRect.right-dstRect.left, dstRect.bottom-dstRect.top, GetFilterScale(CurrentScale)); +#ifdef HAVE_LUA DrawLuaGuiToScreen(Dst.Surface, dstRect.right-dstRect.left, dstRect.bottom-dstRect.top, 16, Dst.Pitch); +#endif } if(pboFunctionsLoaded) diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index d30f0417..dff2e886 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -1698,6 +1698,7 @@ LRESULT CALLBACK WinProc( else if (lstrcmpi(ext, TEXT(".smv")) == 0) { WinMoviePlay(droppedFile); } +#ifdef HAVE_LUA else if (lstrcmpi(ext, TEXT(".lua")) == 0) { if(LuaScriptHWnds.size() < 16) { @@ -1711,6 +1712,7 @@ LRESULT CALLBACK WinProc( } } } +#endif else if (lstrcmpi(ext, TEXT(".wch")) == 0) { if (!Settings.StopEmulation) { SendMenuCommand(ID_RAM_WATCH);