Skip to content

Commit

Permalink
patch for SDL-1.2 repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpndable committed Apr 2, 2023
1 parent 02086e7 commit 480b832
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
7 changes: 6 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ RELEASE_BASE=DotUI-$(RELEASE_TIME)
RELEASE_DOT!=find ./releases/. -regex ".*/$(RELEASE_BASE)-[0-9]+-base\.zip" -printf '.' | wc -m
RELEASE_NAME=$(RELEASE_BASE)-$(RELEASE_DOT)

PATCH = git apply

LIBC_LIB=/opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib
BUNDLE_LIBS=

Expand All @@ -31,10 +33,13 @@ ifeq "$(GCC_VER_GTE9_0)" "1"
BUNDLE_LIBS=bundle
endif

all: lib sdl core emu tools payload readmes $(BUNDLE_LIBS) zip
all: third-party/SDL-1.2/.patched lib sdl core emu tools payload readmes $(BUNDLE_LIBS) zip

extras: emu

third-party/SDL-1.2/.patched:
cd third-party/SDL-1.2 && $(PATCH) -p1 < ../../patches/SDL-1.2/0001-vol-keys.patch && touch .patched

lib:
cd ./src/libmsettings && make
cd ./src/libmmenu && make
Expand Down
34 changes: 34 additions & 0 deletions patches/SDL-1.2/0001-vol-keys.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/src/video/fbcon/SDL_fbevents.c b/src/video/fbcon/SDL_fbevents.c
index 71b25791..dcfac313 100644
--- a/src/video/fbcon/SDL_fbevents.c
+++ b/src/video/fbcon/SDL_fbevents.c
@@ -1107,12 +1107,12 @@ void FB_InitOSKeymap(_THIS)
case SCANCODE_RIGHTCONTROL:
keymap[i] = SDLK_RCTRL;
break;
- case SCANCODE_RIGHTWIN:
- keymap[i] = SDLK_RSUPER;
- break;
- case SCANCODE_LEFTWIN:
+ case SCANCODE_VOLUMEDOWN:
keymap[i] = SDLK_LSUPER;
break;
+ case SCANCODE_VOLUMEUP:
+ keymap[i] = SDLK_RSUPER;
+ break;
case SCANCODE_LEFTALT:
keymap[i] = SDLK_LALT;
break;
diff --git a/src/video/fbcon/SDL_fbkeys.h b/src/video/fbcon/SDL_fbkeys.h
index 3c4dec2f..84524be5 100644
--- a/src/video/fbcon/SDL_fbkeys.h
+++ b/src/video/fbcon/SDL_fbkeys.h
@@ -133,6 +133,8 @@
#define SCANCODE_PAGEDOWN 109
#define SCANCODE_INSERT 110
#define SCANCODE_REMOVE 111
+#define SCANCODE_VOLUMEDOWN 114
+#define SCANCODE_VOLUMEUP 115
#define SCANCODE_POWER 116

#define SCANCODE_RIGHTWIN 126

0 comments on commit 480b832

Please sign in to comment.