win32-dont demand lua dll when shutting down
This commit is contained in:
parent
3316c49348
commit
195514bf78
|
@ -48,13 +48,12 @@
|
|||
extern TASEDITOR_LUA taseditor_lua;
|
||||
#endif
|
||||
|
||||
bool DemandLua()
|
||||
bool CheckLua()
|
||||
{
|
||||
#ifdef WIN32
|
||||
HMODULE mod = LoadLibrary("lua51.dll");
|
||||
if(!mod)
|
||||
{
|
||||
MessageBox(NULL, "lua51.dll was not found. Please get it into your PATH or in the same directory as fceux.exe", "FCEUX", MB_OK | MB_ICONERROR);
|
||||
return false;
|
||||
}
|
||||
FreeLibrary(mod);
|
||||
|
@ -64,6 +63,20 @@ bool DemandLua()
|
|||
#endif
|
||||
}
|
||||
|
||||
bool DemandLua()
|
||||
{
|
||||
#ifdef WIN32
|
||||
if(!CheckLua())
|
||||
{
|
||||
MessageBox(NULL, "lua51.dll was not found. Please get it into your PATH or in the same directory as fceux.exe", "FCEUX", MB_OK | MB_ICONERROR);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <lua.h>
|
||||
|
@ -5674,7 +5687,7 @@ void FCEU_ReloadLuaCode()
|
|||
*/
|
||||
void FCEU_LuaStop() {
|
||||
|
||||
if (!DemandLua())
|
||||
if (!CheckLua())
|
||||
return;
|
||||
|
||||
//already killed
|
||||
|
|
|
@ -17,3 +17,5 @@
|
|||
/vc8_bin_debug
|
||||
/vc8_fceux.ncb
|
||||
/vc8_obj_Debug
|
||||
/vc8_fceux.suo
|
||||
/*.user
|
||||
|
|
Loading…
Reference in New Issue