2022-02-05 14:23:32 +00:00
|
|
|
diff --git a/Makefile b/Makefile
|
|
|
|
index 7b9afa5..bd964f1 100644
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -1,5 +1,6 @@
|
|
|
|
TARGET = 351Files
|
|
|
|
|
|
|
|
+# DEVICE ?= RG552
|
|
|
|
# DEVICE ?= RG351P
|
|
|
|
# DEVICE ?= RG351V
|
|
|
|
# DEVICE ?= RGB10
|
|
|
|
diff --git a/src/def.h b/src/def.h
|
|
|
|
index 92d1a01..db4fec4 100644
|
|
|
|
--- a/src/def.h
|
|
|
|
+++ b/src/def.h
|
2022-02-24 19:28:12 +00:00
|
|
|
@@ -85,6 +85,22 @@
|
2022-02-05 14:23:32 +00:00
|
|
|
#define KEYBOARD_MARGIN 8
|
|
|
|
#define KEYBOARD_KEY_SPACING 4
|
|
|
|
|
|
|
|
+// Parameters for RG552
|
|
|
|
+#elif defined(DEVICE_RG552)
|
2022-02-24 19:28:12 +00:00
|
|
|
+ #define SCREEN_WIDTH 1920
|
|
|
|
+ #define SCREEN_HEIGHT 1152
|
2022-02-05 14:23:32 +00:00
|
|
|
+ #define HARDWARE_ACCELERATION 0
|
|
|
|
+ #define FULLSCREEN 1
|
|
|
|
+ #define FONT_NAME "NotoSans-Regular.ttf"
|
|
|
|
+ #define FONT_NAME_MONO "NotoSansMono-Regular.ttf"
|
2022-02-24 19:28:12 +00:00
|
|
|
+ #define FONT_SIZE 48
|
|
|
|
+ #define LINE_HEIGHT 72
|
|
|
|
+ #define ICON_SIZE 58
|
|
|
|
+ #define MARGIN_X 24
|
|
|
|
+ #define KEYBOARD_MARGIN 19
|
|
|
|
+ #define KEYBOARD_KEY_SPACING 10
|
|
|
|
+ #define KEYBOARD_SYMBOL_SIZE 58
|
2022-02-05 14:23:32 +00:00
|
|
|
+
|
|
|
|
// Paramaters for desktop PC
|
|
|
|
#else
|
|
|
|
#define SCREEN_WIDTH 640
|
2022-02-24 19:28:12 +00:00
|
|
|
@@ -124,7 +139,26 @@
|
2022-02-05 14:23:32 +00:00
|
|
|
#define VIEWER_SCROLL_SPEED 20
|
|
|
|
|
|
|
|
// Button events
|
|
|
|
-#if defined(DEVICE_RG351P)
|
|
|
|
+#if defined(DEVICE_RG552)
|
|
|
|
+ #define BUTTON_PRESSED_UP event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 13
|
|
|
|
+ #define BUTTON_PRESSED_DOWN event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 14
|
|
|
|
+ #define BUTTON_PRESSED_LEFT event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 15
|
|
|
|
+ #define BUTTON_PRESSED_RIGHT event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 16
|
|
|
|
+ #define BUTTON_PRESSED_PAGEUP event.type == SDL_JOYBUTTONDOWN && (event.jbutton.button == 4 || event.jbutton.button == 6)
|
|
|
|
+ #define BUTTON_PRESSED_PAGEDOWN event.type == SDL_JOYBUTTONDOWN && (event.jbutton.button == 5 || event.jbutton.button == 7)
|
|
|
|
+ #define BUTTON_PRESSED_VALIDATE event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 1
|
|
|
|
+ #define BUTTON_PRESSED_BACK event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 0
|
|
|
|
+ #define BUTTON_PRESSED_MENU_CONTEXT event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 2
|
|
|
|
+ #define BUTTON_PRESSED_SELECT event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 3
|
|
|
|
+ #define BUTTON_HELD_UP SDL_JoystickGetButton(g_joystick, 13)
|
|
|
|
+ #define BUTTON_HELD_DOWN SDL_JoystickGetButton(g_joystick, 14)
|
|
|
|
+ #define BUTTON_HELD_LEFT SDL_JoystickGetButton(g_joystick, 15)
|
|
|
|
+ #define BUTTON_HELD_RIGHT SDL_JoystickGetButton(g_joystick, 16)
|
|
|
|
+ #define BUTTON_HELD_PAGEUP SDL_JoystickGetButton(g_joystick, 4) || SDL_JoystickGetButton(g_joystick, 6)
|
|
|
|
+ #define BUTTON_HELD_PAGEDOWN SDL_JoystickGetButton(g_joystick, 5) || SDL_JoystickGetButton(g_joystick, 7)
|
|
|
|
+ #define BUTTON_HELD_SELECT SDL_JoystickGetButton(g_joystick, 3)
|
2022-02-24 19:28:12 +00:00
|
|
|
+ #define BUTTON_HELD_VALIDATE SDL_JoystickGetButton(g_joystick, 1)
|
2022-02-05 14:23:32 +00:00
|
|
|
+#elif defined(DEVICE_RG351P)
|
|
|
|
#define BUTTON_PRESSED_UP event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_UP
|
|
|
|
#define BUTTON_PRESSED_DOWN event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_DOWN
|
|
|
|
#define BUTTON_PRESSED_LEFT event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_LEFT
|