Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing SDL1.2 with SDL2.0 #1246

Merged
merged 10 commits into from
Mar 22, 2015
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ scripts/work/
/SDL.dll
/freetype.dll
/autoexec.cfg
*~
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be here (;

14 changes: 7 additions & 7 deletions other/sdl/sdl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ SDL = {
option.use_winlib = 0
option.lib_path = nil

if ExecuteSilent("pkg-config sdl") == 0 then
if ExecuteSilent("pkg-config sdl2") == 0 then
option.value = true
option.use_pkgconfig = true
elseif ExecuteSilent("sdl-config") > 0 and ExecuteSilent("sdl-config --cflags") == 0 then
elseif ExecuteSilent("sdl2-config") > 0 and ExecuteSilent("sdl2-config --cflags") == 0 then
option.value = true
option.use_sdlconfig = true
end
Expand All @@ -28,11 +28,11 @@ SDL = {

local apply = function(option, settings)
if option.use_pkgconfig == true then
settings.cc.flags:Add("`pkg-config --cflags sdl`")
settings.link.flags:Add("`pkg-config --libs sdl`")
settings.cc.flags:Add("`pkg-config --cflags sdl2`")
settings.link.flags:Add("`pkg-config --libs sdl2`")
elseif option.use_sdlconfig == true then
settings.cc.flags:Add("`sdl-config --cflags`")
settings.link.flags:Add("`sdl-config --libs`")
settings.cc.flags:Add("`sdl2-config --cflags`")
settings.link.flags:Add("`sdl2-config --libs`")
elseif option.use_winlib > 0 then
settings.cc.includes:Add(SDL.basepath .. "/include")
if option.use_winlib == 32 then
Expand All @@ -55,7 +55,7 @@ SDL = {
local display = function(option)
if option.value == true then
if option.use_pkgconfig == true then return "using pkg-config" end
if option.use_sdlconfig == true then return "using sdl-config" end
if option.use_sdlconfig == true then return "using sdl2-config" end
if option.use_winlib == 32 then return "using supplied win32 libraries" end
if option.use_winlib == 64 then return "using supplied win64 libraries" end
return "using unknown method"
Expand Down
311 changes: 0 additions & 311 deletions scripts/SDL_keysym.h

This file was deleted.