Fix no HAVE_LUA build, fix non-Unicode build

This commit is contained in:
gocha 2012-08-15 12:11:17 +09:00
parent 28fd42aa1b
commit 128cd6b3d9
3 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@
#ifdef __WIN32__
#define NOMINMAX
#include <windows.h>
#include <direct.h>
#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)
{

View File

@ -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)

View File

@ -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);