Remove SDL1 GUI. WITH_SDL=yes
and --sdl
are kept around to not break habits
This commit is contained in:
parent
bdd6310bc1
commit
47bae12f59
8 changed files with 17 additions and 1545 deletions
8
.github/workflows/c-cpp.yml
vendored
8
.github/workflows/c-cpp.yml
vendored
|
@ -16,14 +16,12 @@ jobs:
|
|||
- name: update deps
|
||||
run: sudo apt-get -y update
|
||||
- name: install deps
|
||||
run: sudo apt install pkgconf libreadline-dev libsdl1.2-compat-dev libsdl-gfx1.2-dev libsdl2-gfx-dev libsdl2-dev libx11-dev libxext-dev liblua5.4-dev
|
||||
run: sudo apt install pkgconf libreadline-dev libsdl2-gfx-dev libsdl2-dev libx11-dev libxext-dev liblua5.4-dev
|
||||
- name: make standard
|
||||
run: make clean-all && make
|
||||
- name: make sdl1.2 version
|
||||
run: make clean-all && make WITH_SDL2=no WITH_SDL=yes
|
||||
- name: make without any sdl
|
||||
run: make clean-all && make WITH_SDL2=no WITH_SDL=no
|
||||
run: make clean-all && make WITH_SDL2=no
|
||||
- name: make without x11
|
||||
run: make clean-all && make WITH_X11=no
|
||||
- name: make with neither x11 nor sdl
|
||||
run: make clean-all && make WITH_X11=no WITH_SDL2=no WITH_SDL=no
|
||||
run: make clean-all && make WITH_X11=no WITH_SDL2=no
|
||||
|
|
16
Makefile
16
Makefile
|
@ -17,8 +17,8 @@ FULL_WARNINGS = no
|
|||
LUA_VERSION ?= lua
|
||||
PKG_CONFIG ?= pkg-config
|
||||
WITH_X11 ?= yes
|
||||
WITH_SDL ?= yes
|
||||
WITH_SDL2 ?= yes
|
||||
WITH_SDL ?= no
|
||||
|
||||
VERSION_MAJOR = 0
|
||||
VERSION_MINOR = 40
|
||||
|
@ -107,8 +107,10 @@ ifeq ($(WITH_X11), yes)
|
|||
endif
|
||||
|
||||
### SDL2 UI
|
||||
ifeq ($(WITH_SDL), yes)
|
||||
WITH_SDL2 = yes
|
||||
endif
|
||||
ifeq ($(WITH_SDL2), yes)
|
||||
WITH_SDL = no
|
||||
SDLCFLAGS = $(shell "$(PKG_CONFIG)" --cflags sdl2 SDL2_gfx)
|
||||
SDLLIBS = $(shell "$(PKG_CONFIG)" --libs sdl2 SDL2_gfx)
|
||||
|
||||
|
@ -117,16 +119,6 @@ ifeq ($(WITH_SDL2), yes)
|
|||
DOTOS += src/ui_sdl2.o
|
||||
endif
|
||||
|
||||
### SDL UI
|
||||
ifeq ($(WITH_SDL), yes)
|
||||
SDLCFLAGS = $(shell "$(PKG_CONFIG)" --cflags SDL_gfx sdl12_compat)
|
||||
SDLLIBS = $(shell "$(PKG_CONFIG)" --libs SDL_gfx sdl12_compat)
|
||||
|
||||
override CFLAGS += $(SDLCFLAGS) -DHAS_SDL=1
|
||||
LIBS += $(SDLLIBS)
|
||||
DOTOS += src/ui_sdl.o
|
||||
endif
|
||||
|
||||
# depfiles = $(objects:.o=.d)
|
||||
|
||||
# # Have the compiler output dependency files with make targets for each
|
||||
|
|
|
@ -77,7 +77,7 @@ The `Makefile` will try to autodetect if necessary dependencies for x11 and sdl
|
|||
|
||||
You can force disable x11 front-end by compiling with `make WITH_X11=no`.
|
||||
|
||||
You can force disable sdl front-end by compiling with `make WITH_SDL=no`.
|
||||
You can force disable sdl front-end by compiling with `make WITH_SDL2=no`.
|
||||
|
||||
Ncurses front-end is always built-in.
|
||||
|
||||
|
@ -88,13 +88,8 @@ Ncurses front-end is always built-in.
|
|||
|
||||
for SDL2 version:
|
||||
|
||||
- SDL2
|
||||
- SDL2_gfx
|
||||
- SDL 2
|
||||
|
||||
for SDL1 version:
|
||||
|
||||
- SDL_gfx1
|
||||
- SDL 1.2 or sdl12_compat
|
||||
|
||||
for x11 version:
|
||||
|
||||
|
|
14
src/config.c
14
src/config.c
|
@ -281,7 +281,7 @@ int config_init( int argc, char* argv[] )
|
|||
{"debug", no_argument, &clopt_useDebugger, true },
|
||||
|
||||
{"sdl2", no_argument, &clopt_frontend_type, FRONTEND_SDL2},
|
||||
{"sdl", no_argument, &clopt_frontend_type, FRONTEND_SDL },
|
||||
{"sdl", no_argument, &clopt_frontend_type, FRONTEND_SDL2},
|
||||
{"no-chrome", no_argument, &clopt_hide_chrome, true },
|
||||
{"fullscreen", no_argument, &clopt_show_ui_fullscreen, true },
|
||||
{"scale", required_argument, NULL, 7110 },
|
||||
|
@ -332,7 +332,6 @@ int config_init( int argc, char* argv[] )
|
|||
" -V --verbose be verbose (default: false)\n"
|
||||
" --x11 use X11 front-end (default: true)\n"
|
||||
" --sdl2 use SDL2 front-end (default: false)\n"
|
||||
" --sdl use SDL front-end (default: false)\n"
|
||||
" --tui use text front-end (default: false)\n"
|
||||
" --tui-small use text small front-end (2×2 pixels per character) (default: "
|
||||
"false)\n"
|
||||
|
@ -534,8 +533,6 @@ int config_init( int argc, char* argv[] )
|
|||
# define DEFAULT_FRONTEND "x11"
|
||||
#elif HAS_SDL2
|
||||
# define DEFAULT_FRONTEND "sdl2"
|
||||
#elif HAS_SDL
|
||||
# define DEFAULT_FRONTEND "sdl"
|
||||
#else
|
||||
# define DEFAULT_FRONTEND "tui"
|
||||
#endif
|
||||
|
@ -545,8 +542,8 @@ int config_init( int argc, char* argv[] )
|
|||
config.frontend_type = FRONTEND_X11;
|
||||
if ( strcmp( svalue, "sdl2" ) == 0 )
|
||||
config.frontend_type = FRONTEND_SDL2;
|
||||
if ( strcmp( svalue, "sdl" ) == 0 )
|
||||
config.frontend_type = FRONTEND_SDL;
|
||||
if ( strcmp( svalue, "sdl" ) == 0 ) /* retro-compatibility */
|
||||
config.frontend_type = FRONTEND_SDL2;
|
||||
if ( strcmp( svalue, "tui" ) == 0 ) {
|
||||
config.frontend_type = FRONTEND_TEXT;
|
||||
config.small = false;
|
||||
|
@ -713,9 +710,6 @@ int config_init( int argc, char* argv[] )
|
|||
case FRONTEND_SDL2:
|
||||
fprintf( stdout, "sdl2" );
|
||||
break;
|
||||
case FRONTEND_SDL:
|
||||
fprintf( stdout, "sdl" );
|
||||
break;
|
||||
case FRONTEND_TEXT:
|
||||
if ( config.small )
|
||||
fprintf( stdout, "tui-small" );
|
||||
|
@ -725,7 +719,7 @@ int config_init( int argc, char* argv[] )
|
|||
fprintf( stdout, "tui" );
|
||||
break;
|
||||
}
|
||||
fprintf( stdout, "\" -- possible values: \"x11\", \"sdl2\", \"sdl\" (deprecated), \"tui\", \"tui-small\", \"tui-tiny\"\n" );
|
||||
fprintf( stdout, "\" -- possible values: \"x11\", \"sdl2\" \"tui\", \"tui-small\", \"tui-tiny\"\n" );
|
||||
fprintf( stdout, "hide_chrome = %s\n", config.hide_chrome ? "true" : "false" );
|
||||
fprintf( stdout, "fullscreen = %s\n", config.show_ui_fullscreen ? "true" : "false" );
|
||||
fprintf( stdout, "scale = %f -- applies only to sdl2\n", config.scale );
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define FRONTEND_SDL2 3
|
||||
#define FRONTEND_SDL 0
|
||||
#define FRONTEND_TEXT 0
|
||||
#define FRONTEND_X11 1
|
||||
#define FRONTEND_TEXT 2
|
||||
#define FRONTEND_SDL2 2
|
||||
|
||||
typedef struct {
|
||||
char* progname;
|
||||
|
|
22
src/ui.c
22
src/ui.c
|
@ -2193,17 +2193,8 @@ void start_UI( int argc, char** argv )
|
|||
break;
|
||||
#endif
|
||||
|
||||
#if defined( HAS_SDL )
|
||||
case FRONTEND_SDL:
|
||||
# if !defined( HAS_X11 )
|
||||
default:
|
||||
# endif
|
||||
init_sdl_ui( argc, argv );
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FRONTEND_TEXT:
|
||||
#if ( !defined( HAS_X11 ) && !defined( HAS_SDL2 ) && !defined( HAS_SDL ) )
|
||||
#if ( !defined( HAS_X11 ) && !defined( HAS_SDL2 ) )
|
||||
default:
|
||||
#endif
|
||||
init_text_ui( argc, argv );
|
||||
|
@ -2230,17 +2221,8 @@ void ui_stop( void )
|
|||
break;
|
||||
#endif
|
||||
|
||||
#if defined( HAS_SDL )
|
||||
case FRONTEND_SDL:
|
||||
# if !defined( HAS_X11 )
|
||||
default:
|
||||
# endif
|
||||
sdl_ui_stop();
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FRONTEND_TEXT:
|
||||
#if ( !defined( HAS_X11 ) && !defined( HAS_SDL2 ) && !defined( HAS_SDL ) )
|
||||
#if ( !defined( HAS_X11 ) && !defined( HAS_SDL2 ) )
|
||||
default:
|
||||
#endif
|
||||
text_ui_stop();
|
||||
|
|
5
src/ui.h
5
src/ui.h
|
@ -26,11 +26,6 @@ extern void init_sdl2_ui( int argc, char** argv );
|
|||
extern void sdl2_ui_stop( void );
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SDL
|
||||
extern void init_sdl_ui( int argc, char** argv );
|
||||
extern void sdl_ui_stop( void );
|
||||
#endif
|
||||
|
||||
extern void init_text_ui( int argc, char** argv );
|
||||
extern void text_ui_stop( void );
|
||||
|
||||
|
|
1483
src/ui_sdl.c
1483
src/ui_sdl.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue