SDL: fixed input issue and making Lua optional again
This commit is contained in:
parent
06e22c91a8
commit
0aee98b006
|
@ -8,6 +8,7 @@ opts.AddOptions(
|
||||||
BoolOption('OPENGL', 'Enable OpenGL support', 1),
|
BoolOption('OPENGL', 'Enable OpenGL support', 1),
|
||||||
BoolOption('LSB_FIRST', 'Least signficant byte first (non-PPC)', 1),
|
BoolOption('LSB_FIRST', 'Least signficant byte first (non-PPC)', 1),
|
||||||
BoolOption('DEBUG', 'Build with debugging symbols', 0),
|
BoolOption('DEBUG', 'Build with debugging symbols', 0),
|
||||||
|
BoolOption('LUA', 'Enable Lua support', 1),
|
||||||
BoolOption('NEWPPU', 'Enable new PPU core', 0),
|
BoolOption('NEWPPU', 'Enable new PPU core', 0),
|
||||||
BoolOption('CREATE_AVI', 'Enable avi creation support (SDL only)', 0),
|
BoolOption('CREATE_AVI', 'Enable avi creation support (SDL only)', 0),
|
||||||
BoolOption('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1')
|
BoolOption('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1')
|
||||||
|
@ -56,12 +57,12 @@ else:
|
||||||
if not conf.CheckLib('z', autoadd=1):
|
if not conf.CheckLib('z', autoadd=1):
|
||||||
print 'Did not find libz or z.lib, exiting!'
|
print 'Did not find libz or z.lib, exiting!'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
if env['LUA']:
|
||||||
lua51 = conf.CheckLib('lua5.1', autoadd=1)
|
lua51 = conf.CheckLib('lua5.1', autoadd=1)
|
||||||
lua = conf.CheckLib('lua', autoadd=1)
|
lua = conf.CheckLib('lua', autoadd=1)
|
||||||
if lua == 0 and lua51 == 0:
|
if lua == 0 and lua51 == 0:
|
||||||
print 'Did not find liblua5.1, liblua, lua.lib or lua5.1.lib, exiting!'
|
print 'Did not find liblua5.1, liblua, lua.lib or lua5.1.lib, compiling anyway!'
|
||||||
Exit(1)
|
env['LUA'] = 0
|
||||||
|
|
||||||
|
|
||||||
### Search for zenity if we're not in windows
|
### Search for zenity if we're not in windows
|
||||||
if env['PLATFORM'] != 'win32' and env['PLATFORM'] != 'cygwin':
|
if env['PLATFORM'] != 'win32' and env['PLATFORM'] != 'cygwin':
|
||||||
|
@ -102,6 +103,7 @@ else:
|
||||||
conf.env.Append(CPPDEFINES = ['PSS_STYLE=1'])
|
conf.env.Append(CPPDEFINES = ['PSS_STYLE=1'])
|
||||||
# parse SDL cflags/libs
|
# parse SDL cflags/libs
|
||||||
env.ParseConfig('sdl-config --cflags --libs')
|
env.ParseConfig('sdl-config --cflags --libs')
|
||||||
|
if env['LUA']:
|
||||||
# parse liblua cflags
|
# parse liblua cflags
|
||||||
if lua51:
|
if lua51:
|
||||||
env.Append(CPPPATH = ['/usr/local/include/lua5.1', '/usr/include/lua5.1'])
|
env.Append(CPPPATH = ['/usr/local/include/lua5.1', '/usr/include/lua5.1'])
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
15-apr-2009 - shinydoofy - sdl - Lua is optional again, fixed the real issue
|
||||||
14-apr-2009 - punkrockguy - sdl - LUA is NO longer optional, so the SConscripts have been updated to reflect that change. This fixes the mysterious non-working input issue.
|
14-apr-2009 - punkrockguy - sdl - LUA is NO longer optional, so the SConscripts have been updated to reflect that change. This fixes the mysterious non-working input issue.
|
||||||
12-apr-2009 - shinydoofy - sdl - implemented saving/loading a savestate from a specific file on Alt+S/L
|
12-apr-2009 - shinydoofy - sdl - implemented saving/loading a savestate from a specific file on Alt+S/L
|
||||||
11-apr-2009 - shinydoofy - sdl - implemented starting an FM2 movie on Alt+R
|
11-apr-2009 - shinydoofy - sdl - implemented starting an FM2 movie on Alt+R
|
||||||
|
|
|
@ -12,7 +12,6 @@ file.cpp
|
||||||
filter.cpp
|
filter.cpp
|
||||||
ines.cpp
|
ines.cpp
|
||||||
input.cpp
|
input.cpp
|
||||||
lua-engine.cpp
|
|
||||||
netplay.cpp
|
netplay.cpp
|
||||||
nsf.cpp
|
nsf.cpp
|
||||||
oldmovie.cpp
|
oldmovie.cpp
|
||||||
|
@ -41,6 +40,9 @@ mappers
|
||||||
Import('env')
|
Import('env')
|
||||||
Export('env')
|
Export('env')
|
||||||
|
|
||||||
|
if env['LUA']:
|
||||||
|
file_list.append('lua-engine.cpp')
|
||||||
|
|
||||||
if env['CREATE_AVI']:
|
if env['CREATE_AVI']:
|
||||||
subdirs.append('drivers/videolog')
|
subdirs.append('drivers/videolog')
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ rgbtorgb.cpp
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
if env['LOGO']:
|
if env['LOGO']:
|
||||||
env.Append(LIBS = ["gd"])
|
|
||||||
env.Append(CCFLAGS = "-DHAVE_GD")
|
env.Append(CCFLAGS = "-DHAVE_GD")
|
||||||
|
|
||||||
for x in range(len(my_list)):
|
for x in range(len(my_list)):
|
||||||
|
|
|
@ -202,6 +202,9 @@ static void UpdateGP(int w, void *data, int arg)
|
||||||
joy[2]= FCEU_LuaUsingJoypad(2) ? (FCEU_LuaReadJoypad(2) | (*(uint32 *)joyports[0].ptr >> 16)) : *(uint32 *)joyports[0].ptr >> 16;
|
joy[2]= FCEU_LuaUsingJoypad(2) ? (FCEU_LuaReadJoypad(2) | (*(uint32 *)joyports[0].ptr >> 16)) : *(uint32 *)joyports[0].ptr >> 16;
|
||||||
if (FCEU_LuaReadJoypadFalse(2))
|
if (FCEU_LuaReadJoypadFalse(2))
|
||||||
joy[2] &= FCEU_LuaReadJoypadFalse(2);
|
joy[2] &= FCEU_LuaReadJoypadFalse(2);
|
||||||
|
#else // without this, there seems to be no input at all without Lua
|
||||||
|
joy[0] = *(uint32 *)joyports[0].ptr;;
|
||||||
|
joy[2] = *(uint32 *)joyports[0].ptr >> 16;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -215,6 +218,9 @@ static void UpdateGP(int w, void *data, int arg)
|
||||||
joy[3]= FCEU_LuaUsingJoypad(3) ? (FCEU_LuaReadJoypad(3) | (*(uint32 *)joyports[1].ptr >> 24)) : *(uint32 *)joyports[1].ptr >> 24;
|
joy[3]= FCEU_LuaUsingJoypad(3) ? (FCEU_LuaReadJoypad(3) | (*(uint32 *)joyports[1].ptr >> 24)) : *(uint32 *)joyports[1].ptr >> 24;
|
||||||
if (FCEU_LuaReadJoypadFalse(3))
|
if (FCEU_LuaReadJoypadFalse(3))
|
||||||
joy[3] &= FCEU_LuaReadJoypadFalse(3);
|
joy[3] &= FCEU_LuaReadJoypadFalse(3);
|
||||||
|
#else // same goes for the other two pads
|
||||||
|
joy[1] = *(uint32 *)joyports[1].ptr >> 8;
|
||||||
|
joy[3] = *(uint32 *)joyports[1].ptr >> 24;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue