summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2021-05-07 19:56:22 +0000
committerneonloop2021-05-07 19:56:22 +0000
commit752c5e7f995bdceba1853d05b4bc1348eefa8a3b (patch)
treefbb246a6720846c731a34df9df33364f8e6e89ea
parent2ddd290b8226e1d1f0c52e344e76150261a8c0c3 (diff)
downloadchocolate-doom-752c5e7f995bdceba1853d05b4bc1348eefa8a3b.tar.gz
chocolate-doom-752c5e7f995bdceba1853d05b4bc1348eefa8a3b.tar.bz2
chocolate-doom-752c5e7f995bdceba1853d05b4bc1348eefa8a3b.zip
Initial trimui s support
-rwxr-xr-xbuild-trimui.sh6
-rw-r--r--src/i_video.c5
-rw-r--r--src/m_controls.c22
3 files changed, 20 insertions, 13 deletions
diff --git a/build-trimui.sh b/build-trimui.sh
new file mode 100755
index 00000000..9a29191f
--- /dev/null
+++ b/build-trimui.sh
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+SYSROOT=$(${CROSS_COMPILE}gcc --print-sysroot)
+autoreconf -vif --include=$SYSROOT/usr/share/aclocal/
+CFLAGS=$($SYSROOT/usr/bin/sdl-config --cflags) LDFLAGS=$($SYSROOT/usr/bin/sdl-config --libs) ./configure --host=arm-buildroot-linux-gnueabi
+make
diff --git a/src/i_video.c b/src/i_video.c
index ec0fc58f..6ebdbe46 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -181,7 +181,7 @@ static boolean native_surface;
// Screen width and height, from configuration file.
int screen_width = SCREENWIDTH;
-int screen_height = SCREENHEIGHT;
+int screen_height = SCREENHEIGHT_4_3;
// Color depth.
@@ -488,6 +488,7 @@ static int TranslateKey(SDL_keysym *sym)
return KEY_RSHIFT;
case SDLK_LCTRL:
+ return KEY_CAPSLOCK;
case SDLK_RCTRL:
return KEY_RCTRL;
@@ -1359,7 +1360,7 @@ static boolean AutoAdjustFullscreen(void)
// Never choose a screen mode that we cannot run in, or
// is poor quality for fullscreen
- if (screen_mode == NULL || screen_mode->poor_quality)
+ if (screen_mode == NULL)
{
// printf("\tUnsupported / poor quality\n");
continue;
diff --git a/src/m_controls.c b/src/m_controls.c
index 35f848c7..295ca49a 100644
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@ -31,12 +31,12 @@ int key_left = KEY_LEFTARROW;
int key_up = KEY_UPARROW;
int key_down = KEY_DOWNARROW;
-int key_strafeleft = ',';
-int key_straferight = '.';
-int key_fire = KEY_RCTRL;
+int key_strafeleft = KEY_TAB;
+int key_straferight = KEY_BACKSPACE;
+int key_fire = KEY_CAPSLOCK;
int key_use = ' ';
-int key_strafe = KEY_RALT;
-int key_speed = KEY_RSHIFT;
+int key_strafe = 0;
+int key_speed = KEY_LALT;
//
// Heretic keyboard controls
@@ -129,7 +129,7 @@ int key_weapon6 = '6';
int key_weapon7 = '7';
int key_weapon8 = '8';
int key_prevweapon = 0;
-int key_nextweapon = 0;
+int key_nextweapon = KEY_RSHIFT;
// Map control keys:
@@ -139,7 +139,7 @@ int key_map_east = KEY_RIGHTARROW;
int key_map_west = KEY_LEFTARROW;
int key_map_zoomin = '=';
int key_map_zoomout = '-';
-int key_map_toggle = KEY_TAB;
+int key_map_toggle = KEY_RCTRL;
int key_map_maxzoom = '0';
int key_map_follow = 'f';
int key_map_grid = 'g';
@@ -153,10 +153,10 @@ int key_menu_up = KEY_UPARROW;
int key_menu_down = KEY_DOWNARROW;
int key_menu_left = KEY_LEFTARROW;
int key_menu_right = KEY_RIGHTARROW;
-int key_menu_back = KEY_BACKSPACE;
-int key_menu_forward = KEY_ENTER;
-int key_menu_confirm = 'y';
-int key_menu_abort = 'n';
+int key_menu_back = KEY_CAPSLOCK;
+int key_menu_forward = ' ';
+int key_menu_confirm = ' ';
+int key_menu_abort = KEY_CAPSLOCK;
int key_menu_help = KEY_F1;
int key_menu_save = KEY_F2;