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;
|
extern TASEDITOR_LUA taseditor_lua;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool DemandLua()
|
bool CheckLua()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
HMODULE mod = LoadLibrary("lua51.dll");
|
HMODULE mod = LoadLibrary("lua51.dll");
|
||||||
if(!mod)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
FreeLibrary(mod);
|
FreeLibrary(mod);
|
||||||
|
@ -64,6 +63,20 @@ bool DemandLua()
|
||||||
#endif
|
#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"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include <lua.h>
|
#include <lua.h>
|
||||||
|
@ -5674,7 +5687,7 @@ void FCEU_ReloadLuaCode()
|
||||||
*/
|
*/
|
||||||
void FCEU_LuaStop() {
|
void FCEU_LuaStop() {
|
||||||
|
|
||||||
if (!DemandLua())
|
if (!CheckLua())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//already killed
|
//already killed
|
||||||
|
|
|
@ -17,3 +17,5 @@
|
||||||
/vc8_bin_debug
|
/vc8_bin_debug
|
||||||
/vc8_fceux.ncb
|
/vc8_fceux.ncb
|
||||||
/vc8_obj_Debug
|
/vc8_obj_Debug
|
||||||
|
/vc8_fceux.suo
|
||||||
|
/*.user
|
||||||
|
|
Loading…
Reference in New Issue