Skip to content

Commit c00d510

Browse files
committed
[module-dreameye] Fix click on preview.
1 parent 24c9453 commit c00d510

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

modules/dreameye/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EXPORTS_FILE = exports.txt
1111

1212
VER_MAJOR = 1
1313
VER_MINOR = 2
14-
VER_MICRO = 2
14+
VER_MICRO = 3
1515

1616
all: rm-elf
1717

modules/dreameye/preview.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* DreamShell ##version##
22
33
preview.c - dreameye preview
4-
Copyright (C) 2023, 2024 SWAT
4+
Copyright (C) 2023-2025 SWAT
55
66
*/
77

@@ -147,23 +147,23 @@ static void onPreviewClick(void) {
147147
}
148148

149149
static void EventHandler(void *ds_event, void *param, int action) {
150-
150+
151151
SDL_Event *event = (SDL_Event *) param;
152152

153153
switch(event->type) {
154154
case SDL_JOYBUTTONDOWN:
155-
switch(event->jbutton.button) {
156-
case SDL_DC_B:
157-
case SDL_DC_A:
158-
case SDL_DC_Y:
159-
case SDL_DC_X:
160-
// case SDL_DC_START:
161-
onPreviewClick();
162-
break;
155+
if(is_fullscreen) {
156+
switch(event->jbutton.button) {
157+
case SDL_DC_B:
158+
case SDL_DC_A:
159+
onPreviewClick();
160+
break;
161+
}
163162
}
164163
break;
165164
case SDL_MOUSEBUTTONDOWN:
166-
if(event->button.button == SDL_BUTTON_LEFT || event->button.button == SDL_BUTTON_RIGHT) {
165+
if(event->button.button == SDL_BUTTON_LEFT ||
166+
event->button.button == SDL_BUTTON_RIGHT) {
167167
onPreviewClick();
168168
}
169169
break;

0 commit comments

Comments
 (0)