Skip to content

Commit b101235

Browse files
committed
Remove SDL 1.2
1 parent 11794c7 commit b101235

13 files changed

+16
-2396
lines changed

.github/workflows/linux.yml

-16
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,6 @@ jobs:
3737
with:
3838
name: Odamex-Linux-x86_64
3939
path: 'build/artifact/*'
40-
build-sdl12:
41-
name: Build (SDL 1.2)
42-
needs: pre_job
43-
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
44-
runs-on: ubuntu-latest
45-
env:
46-
USE_SDL12: 1
47-
steps:
48-
- name: Checkout source
49-
uses: actions/checkout@v4
50-
- name: Checkout submodules
51-
run: git submodule update --init --recursive
52-
- name: Prepare build
53-
run: bash ci/ubuntu-buildgen.sh
54-
- name: Run build
55-
run: cmake --build ./build/
5640
build-clang:
5741
name: Build (Clang)
5842
needs: pre_job

ci/ubuntu-buildgen.sh

+6-18
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,12 @@ set -x
99

1010
# Install packages
1111
sudo apt update
12-
if [[ -z ${USE_SDL12:-} ]]; then
13-
sudo apt install ninja-build libsdl2-dev libsdl2-mixer-dev \
14-
libcurl4-openssl-dev libpng-dev libwxgtk3.2-dev deutex
15-
else
16-
sudo apt install ninja-build libsdl1.2-dev libsdl-mixer1.2-dev \
17-
libcurl4-openssl-dev libpng-dev libwxgtk3.2-dev deutex
18-
fi
12+
sudo apt install ninja-build libsdl2-dev libsdl2-mixer-dev \
13+
libcurl4-openssl-dev libpng-dev libwxgtk3.2-dev deutex
1914

2015
# Generate build
2116
mkdir -p build && cd build
22-
if [[ -z ${USE_SDL12:-} ]]; then
23-
cmake .. -GNinja \
24-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
25-
-DBUILD_OR_FAIL=1 -DBUILD_CLIENT=1 -DBUILD_SERVER=1 \
26-
-DBUILD_MASTER=1 -DBUILD_LAUNCHER=1
27-
else
28-
cmake .. -GNinja \
29-
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_SDL12=1 \
30-
-DBUILD_OR_FAIL=1 -DBUILD_CLIENT=1 -DBUILD_SERVER=1 \
31-
-DBUILD_MASTER=1 -DBUILD_LAUNCHER=1
32-
fi
17+
cmake .. -GNinja \
18+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
19+
-DBUILD_OR_FAIL=1 -DBUILD_CLIENT=1 -DBUILD_SERVER=1 \
20+
-DBUILD_MASTER=1 -DBUILD_LAUNCHER=1

client/sdl/i_input.cpp

+6-10
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@
4848
#include "nx_io.h"
4949
#endif
5050

51-
#if defined(SDL12)
52-
#include "i_input_sdl12.h"
53-
#elif defined(SDL20)
51+
#if defined(SDL20)
5452
#include "i_input_sdl20.h"
5553
#endif
5654

@@ -434,7 +432,7 @@ static void I_UpdateGrab()
434432
// force I_ResumeMouse or I_PauseMouse if toggling between fullscreen/windowed
435433
bool fullscreen = I_GetWindow()->isFullScreen();
436434
static bool prev_fullscreen = fullscreen;
437-
if (fullscreen != prev_fullscreen)
435+
if (fullscreen != prev_fullscreen)
438436
I_ForceUpdateGrab();
439437
prev_fullscreen = fullscreen;
440438

@@ -478,7 +476,7 @@ CVAR_FUNC_IMPL(joy_active)
478476
}
479477
}
480478

481-
#ifdef GCONSOLE
479+
#ifdef GCONSOLE
482480
// Don't let console users choose an invalid joystick because
483481
// they won't have any way to reenable through the menu.
484482
if (!devices.empty())
@@ -517,7 +515,7 @@ std::string I_GetJoystickNameFromIndex(int index)
517515
bool I_OpenJoystick()
518516
{
519517
I_CloseJoystick(); // just in case it was left open...
520-
518+
521519
if (use_joystick != 0)
522520
{
523521
// Verify that the joystick ID indicated by the joy_active CVAR
@@ -596,9 +594,7 @@ bool I_InitInput()
596594

597595
atterm(I_ShutdownInput);
598596

599-
#if defined(SDL12)
600-
input_subsystem = new ISDL12InputSubsystem();
601-
#elif defined(SDL20)
597+
#if defined(SDL20)
602598
input_subsystem = new ISDL20InputSubsystem();
603599
#endif
604600

@@ -794,7 +790,7 @@ void IInputSubsystem::disableTextEntry()
794790
// Joystick hat events also repeat but each directional trigger repeats
795791
// concurrently as long as they are held down. Thus a unique value is returned
796792
// for each of them.
797-
//
793+
//
798794
static int I_GetEventRepeaterKey(const event_t* ev)
799795
{
800796
if (ev->type != ev_keydown && ev->type != ev_keyup)

0 commit comments

Comments
 (0)