Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not cache lightgun input #1067

Merged
merged 28 commits into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,14 @@ else
CFLAGS += -D__WIN32__
endif


# All Android platforms #############################
ifneq ($(findstring Android, $(platform)), )
PLATCFLAGS += -D__ANDROID__
else ifneq ($(findstring android, $(platform)), )
PLATCFLAGS += -D__ANDROID__
endif

# Architecture-specific flags #############################

ifeq ($(BIGENDIAN), 1)
Expand All @@ -716,9 +724,10 @@ endif

# End of architecture-specific flags ######################

# Compiler flags for all platforms #############################
# Compiler flags for all platforms ########################

# explictly use -fsigned-char on all platforms to solve problems with code written/tested on x86 but used on ARM
# explictly use -fsigned-char on all platforms to solve problems
# with code written/tested on x86 but used on ARM
# for example, audio on rtype leo is wrong on ARM without this flag
ifeq (,$(findstring msvc,$(platform)))
CFLAGS += -fsigned-char
Expand Down
6 changes: 4 additions & 2 deletions src/inptport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1491,10 +1491,12 @@ profiler_mark(PROFILER_INPUT);
osd_analogjoy_read (i, analog_current_axis[i], analogjoy_input[i]);

/* update mouse/trackball position */
osd_trak_read (i, &(mouse_delta_axis[i])[X_AXIS], &(mouse_delta_axis[i])[Y_AXIS]);
if(options.mouse_device == RETRO_DEVICE_MOUSE || options.mouse_device == RETRO_DEVICE_POINTER)
osd_xy_device_read (i, &(mouse_delta_axis[i])[X_AXIS], &(mouse_delta_axis[i])[Y_AXIS]);

/* update lightgun position, if any */
osd_lightgun_read (i, &(lightgun_delta_axis[i])[X_AXIS], &(lightgun_delta_axis[i])[Y_AXIS]);
else if(options.mouse_device == RETRO_DEVICE_LIGHTGUN)
osd_xy_device_read (i, &(lightgun_delta_axis[i])[X_AXIS], &(lightgun_delta_axis[i])[Y_AXIS]);
}

for (i = 0;i < MAX_INPUT_PORTS;i++)
Expand Down
Loading