Nathan Strong
5b4b766459
Fix wiimotes regression
...
== DETAILS
- only call disconnect when we're actually disconnecting a remote
(e.g. read errors or remote goes to sleep).
- clean up some compile warnings introduced by others (mainly
unused variables)
2021-10-16 23:56:15 -07:00
Autechre
f86c28afac
Merge pull request #13120 from libretro/move-runloop2
...
move more state to runloop_state
2021-10-15 16:43:44 +02:00
twinaphex
9184d0e114
Move hid_data to input_st
2021-10-15 16:31:31 +02:00
twinaphex
5c6d92bb95
move more state to runloop_state
2021-10-15 16:13:21 +02:00
twinaphex
b200ced199
Buildfix for --have-menu
2021-10-15 14:43:25 +02:00
twinaphex
9b4636ff62
Fixes --disable-menu
2021-10-15 14:32:07 +02:00
twinaphex
af40baa04d
Address feedback
2021-10-15 13:54:04 +02:00
twinaphex
a291323467
Move some code to gfx/video_driver.c
2021-10-15 02:25:12 +02:00
twinaphex
40aa7dad10
Move code to menu_driver.c and rename retroarch_ function to runloop_
...
function
2021-10-15 02:14:43 +02:00
twinaphex
6f7b5a3f15
Buildfix for non-HAVE_DYNAMIC
2021-10-15 00:23:40 +02:00
twinaphex
70b337782d
Fix MSVC build
2021-10-15 00:11:52 +02:00
twinaphex
b9500ff729
Move state over to runloop state
2021-10-14 22:18:14 +02:00
twinaphex
5e8b2bfed1
Move variables to runloop state
2021-10-14 22:02:09 +02:00
twinaphex
ba19dc3140
Move more related to core to runloop_state
2021-10-14 21:47:35 +02:00
twinaphex
bf2c3902d4
Cleanups
2021-10-14 21:35:38 +02:00
twinaphex
2b41173cd5
Move more state to runloop_state
2021-10-14 21:22:07 +02:00
twinaphex
6d6ed11b60
remove unused p_rarch variables
2021-10-14 21:18:53 +02:00
twinaphex
eef9668263
move runloop state from retroarch_data to runloop_state
2021-10-14 21:15:11 +02:00
jdgleaver
40925baacd
Enable SRAM for contentless cores
2021-10-14 13:59:23 +01:00
twinaphex
c19b04e21e
Cleanup emscripten_mainloop
2021-10-13 23:15:14 +02:00
twinaphex
b5e7957260
Fix emscripten
2021-10-13 23:14:26 +02:00
twinaphex
c098a321b4
silence more warnings
2021-10-13 20:27:31 +02:00
twinaphex
a79bd56018
(WiiU) Prevent implicit declarations
2021-10-13 20:22:01 +02:00
twinaphex
22d70a64dd
Move command_write_memory and command_read_memory to command.c
2021-10-13 18:15:35 +02:00
twinaphex
753a04c9c1
Move menu_driver_toggle to menu_driver.c
2021-10-13 17:59:45 +02:00
twinaphex
68f0e50a2f
rename a bunch of functions to runloop_ prefix instead of retroarch_ -
...
we need to make a better distinction between runloop and the 'retroarch
state'
2021-10-13 17:48:40 +02:00
twinaphex
0b66c81197
Move state variables to runloop_state
2021-10-13 17:37:24 +02:00
twinaphex
e72a88a98e
Move some variables to widget state
2021-10-13 17:25:31 +02:00
twinaphex
d87e0c1744
* Fix implicit declaration
...
* Move more code to gfx/video_driver.c
2021-10-13 16:36:38 +02:00
twinaphex
e47e9968ed
Move audio_driver_menu_sample to audio_driver.c and turn
...
audio_driver_flush into static function
2021-10-13 16:29:41 +02:00
twinaphex
f070da6dfc
Move code to menu_driver.c and input_driver.c
2021-10-13 15:40:01 +02:00
twinaphex
99b09ce359
Move more code to gfx/video_driver.c
2021-10-13 15:20:09 +02:00
twinaphex
5f4d4fe678
Move more code from retroarch.c to video_driver.c - retroarch.c now
...
778kb
2021-10-13 15:15:24 +02:00
Autechre
0a888f7868
Move video state to gfx/video_driver.c - reduces filesize of retroarch.c to 809kb ( #13104 )
...
* Move video state to gfx/video_driver.c - reduces filesize of retroarch.c
to 809Kb
2021-10-13 14:56:22 +02:00
twinaphex
e9d4fcc00c
Buildfix
2021-10-11 18:06:25 +02:00
Bernhard Schelling
a3d9201581
Add environment callback to get the rate retro_run is called ( #13022 )
...
* Add GET_THROTTLE_STATE environment callback
* Add RETRO_THROTTLE_UNBLOCKED
to report the case where neither vsync nor audio is limiting the call rate.
Also fix reporting of some special cases when the menu is open.
* Change throttle state mode to unsigned
Use #defines Instead of the untyped C enum to allow easier future additions.
* Spelling fixes
* Avoid any divide-by-zero
2021-10-11 18:05:13 +02:00
Autechre
e7f182811a
Split up audio code into new file audio/audio_driver.c ( #13097 )
...
* Split up audio code into new file audio/audio_driver.c
* Fix build issues #1
* Small cleanup
* Fix typo
2021-10-11 18:01:37 +02:00
twinaphex
3d710db798
input_state_wrapper symbol name was causing collisions with certain
...
cores on statically linked platforms
2021-10-08 12:50:45 +02:00
jdgleaver
534f8da487
Add enviroment callback to enable cores to notify the frontend that a core option value has changed
2021-10-06 16:45:14 +01:00
twinaphex
682d45379c
Buildfix
2021-10-06 06:03:33 +02:00
twinaphex
61ee2274e6
Move more code over to input_driver.c - BSV code in particular but
...
also input state function callbacks - retroarch.c code size reduced
to 874Kb
2021-10-06 05:57:39 +02:00
Autechre
f242ef6a7c
Merge pull request #13073 from gblues/gblues/wiiu-unified-hid
...
Gblues/wiiu unified hid
2021-10-06 02:25:08 +02:00
twinaphex
f4734d223c
Another buildfix
2021-10-05 22:57:49 +02:00
twinaphex
376b7a622c
Fix NGC/Wii builds
2021-10-05 22:18:08 +02:00
Nathan Strong
e02e345a28
Make GCA driver compatible with other HID drivers
...
== DETAILS
Use a little trickery to ensure the GCA driver continues working
with other HID implementation.
I've expanded the joypad implementation to support multi-pad devices.
However, this requires changes to each HID implementation to actually
function.
I've made the necessary changes for WIIU, but I don't have the means
of making the change in the other HID implementations.
So, I've built in a backwards-compatibilty mode for the driver.
The trick is to have an identifier byte at the top of both data structs
that the driver returns. We can then use that byte to determine which
of the structs has been passed to the pad functions and act accordingly.
In the GCA case, for non-wiiu platforms, it will simply expose port 1
of the GCA and the other 3 ports do nothing.
2021-10-05 09:47:03 -07:00
Nathan Strong
5da1cd08ff
Unify the HID driver architecture
...
== DETAILS
When I first implemented the Wii U HID architecture, I ended up
having to design my own implementation because, at the time, I did
not have a way to read the HID device string to allow the existing
code to successfully detect the gamepad.
After spending some time experimenting, I've figured out how to
do this. And that means I can better align the HID driver with other
platforms.
change summary:
- create a single state structure for all three sub-types of wiiu pads
(kpad, wpad, and hid)
- eliminate confusing duplicate pad lists
- eliminate confusing duplicate HID pad drivers (ds3, gamecube
adapter, etc)
- ensure the ds3 driver still works
2021-10-05 09:23:08 -07:00
Francisco Javier Trujillo Mata
9f96723dd0
Adding proper translations for changing resolution
2021-10-04 23:53:55 +02:00
Francisco Javier Trujillo Mata
3bbfcf7b39
Adding to get_video_output_size 2 parameters for additional info
2021-10-04 23:53:55 +02:00
Francisco Javier Trujillo Mata
216675919b
Add PS2 Support for changing resolution and offset
2021-10-04 23:53:55 +02:00
Autechre
8807e2957e
Input refactors pt3 ( #13053 )
...
* Move more internal state over to input_driver.c and menu_driver.c -
retroarch.c now down to 893kb
- Remove now unused p_rarch pointers in functions
2021-10-01 07:18:30 +02:00
twinaphex
e9a4e811ac
Move more code and variables from rarch_state out to input_driver
...
and menu_driver
2021-10-01 00:41:50 +02:00
twinaphex
49fbed2423
Get rid of input_mouse_grabbed - move retroarch types to
...
retroarch_types.h
2021-09-30 23:22:50 +02:00
twinaphex
878ad88e5b
Buildfix
2021-09-30 21:34:36 +02:00
twinaphex
dbe414e1e1
move input_poll_overlay to input_driver.c
2021-09-30 21:29:35 +02:00
twinaphex
ef875f6102
Create input_state_get_ptr - move to input_driver.c -
...
also moved over the functions that had a dependence on this
state - retroarch.c reduced to 979kb now
2021-09-30 20:54:56 +02:00
twinaphex
e13073c411
move gfx_thumb_state to gfx_thumbnail.c
2021-09-30 18:05:00 +02:00
twinaphex
b1410c72e5
- Move disp_get_ptr to gfx_display.c
...
- Move menu_driver_init to menu_driver.c, and turn
menu_driver_init_internal into static function
2021-09-30 17:14:26 +02:00
twinaphex
5ba8843354
Move dispwidget_get_ptr over to gfx_widgets.c
2021-09-30 04:40:15 +02:00
twinaphex
0364a277e4
Fix function declaration
2021-09-28 15:22:33 +02:00
twinaphex
4c419466e6
Cleanups
2021-09-28 15:19:08 +02:00
twinaphex
9bb2359a86
More naming consistency changes - take 'retroarch_' prefix out of
...
functions that don't touch p_rarch state
2021-09-28 13:48:49 +02:00
twinaphex
f90809d754
Move data out of retroarch_data.h and into retroarch.c
2021-09-28 13:02:14 +02:00
twinaphex
e886e908d5
Create consistent naming conventions - use retroarch_ instead
...
of rarch_ for some functions for all functions coming from retroarch.h
2021-09-28 12:56:10 +02:00
twinaphex
e4bec6739c
Move code over to menu_driver.c
2021-09-28 12:07:29 +02:00
twinaphex
e31fbb8048
Move menu_driver_alive to menu_state
2021-09-28 10:11:13 +02:00
twinaphex
1e29ba3cd6
Move menu_driver_is_binding to menu_state
2021-09-28 09:52:46 +02:00
twinaphex
9e26012751
Move menu_driver_init_internal to menu_driver.c
2021-09-28 09:32:11 +02:00
twinaphex
9727be4de6
Cleanup
2021-09-28 04:03:15 +02:00
twinaphex
774dccca7c
Move more code over to gfx/video_driver.c
2021-09-28 02:15:11 +02:00
twinaphex
3dee62ce62
Cleanups and buildfix
2021-09-28 01:16:53 +02:00
twinaphex
05e4aa8bfb
move more code over to gfx/video_driver.c
2021-09-28 00:50:48 +02:00
twinaphex
4574a58683
(video_driver.c) Move some code over
2021-09-27 20:31:31 +02:00
twinaphex
0448afab96
Move video driver functions over to gfx/video_driver.c
2021-09-27 19:37:22 +02:00
twinaphex
c3afd4b1a5
Buildfix for Emscripten
2021-09-26 23:07:51 +02:00
twinaphex
4b5951bda3
Rename gl_common.h to gl2_common.h and remove some file dependencies
...
on it
2021-09-26 17:42:12 +02:00
twinaphex
ee97c2066a
Make sure this is no longer a function behind a ifdef - too much
...
maintenance chores
2021-09-26 02:47:43 +02:00
twinaphex
89968333a4
Attempt to fix Mac build
2021-09-26 02:38:57 +02:00
Nathan Strong
fb86ca6e33
Fix the snprintf warnings for everyone this time
...
== DETAILS
So, basically this back-and-forth is because we used fixed-size
data types (i.e. `uint32_t`) which maps to different primitive data
types on different platforms. So `uint32_t` might be a `long` on some
platforms (e.g. Wii U), while it's just a plain integer on others (PC).
And the format specifier works off primitive data type, not data type
size.
So, to resolve this, we:
- keep `%lx` as the format specifier
- cast the parameter to printf to unsigned long
This is better than the alternatives that could cause problems trying to
cast a long down to an int.
2021-09-25 15:08:34 -07:00
Nathan Strong
9b2d4236ad
WIIU: Clean up a bunch of compiler warnings
...
== DETAILS
These changes fall into a few broad categories:
1. Explicitly undefine things we want to re-define due to conflicts with
the version of devkitpro we're using
2. Clean up hex format specifiers to use `%lx` or `%lX` when working with
long integers
3. Move variables inside the ifdef they're used in to squelch "unused variable"
messages
4. Add parenthesis to make Wii U shader declarations stop complaining
And then there's a weird "misleading indent" warning that I fixed by just
rewriting a block of code to use a switch statement instead of if-then-else.
These changes work fine on Wii U, but we'll need to keep an eye on CI/CD to see
if other platform builds break.
2021-09-25 13:25:39 -07:00
Ben Hamilton (Ben Gertzfield)
1970786932
New feature: Use gamepad combo to quit Retroarch ( #13017 )
...
* Refactor menu toggle combo button logic to allow quit combo button
* Quit gamepad combo
* Fixes from @jdgleaver
2021-09-24 18:30:46 +02:00
twinaphex
6eeebeab25
Get rid of gfx_display_set_msg_force
2021-09-21 21:10:38 +02:00
twinaphex
83ce4259a0
Have only one getter for runloop_state
2021-09-21 19:08:26 +02:00
twinaphex
550d3fa766
Create new header runloop.h
2021-09-21 18:38:53 +02:00
twinaphex
f21641d898
Get rid of another 'getter' function
2021-09-21 18:30:56 +02:00
twinaphex
1b7dea7e8e
Move code over to menu_driver.c
2021-09-21 18:14:01 +02:00
twinaphex
c42f932c3f
Moved code over to menu_driver.c
2021-09-21 18:04:48 +02:00
twinaphex
f11f892076
Put retroarch_apply_shader_preset behind ifdef
2021-09-21 17:31:51 +02:00
twinaphex
7c8c53fb2d
Get rid of menu_driver_get_ptr - we are going to be using only one
...
getter for each component state instead of several getters
2021-09-21 07:14:27 +02:00
twinaphex
44012ace47
move more menu state over to menu_driver.c
2021-09-21 06:05:25 +02:00
twinaphex
28e0b669d2
(menu) move more state over
2021-09-21 05:44:53 +02:00
twinaphex
58bc88d433
Move menu_driver_state over to menu_driver.c and move it out of
...
p_rarch
2021-09-21 05:33:46 +02:00
twinaphex
30353ac8f2
move more code out of retroarch.c/retroarch_data.h and into
...
menu_driver.c
2021-09-21 05:11:39 +02:00
twinaphex
d68a138250
Move more menu state to menu_state_t - and move code from
...
retroarch.c to menu_driver.c
2021-09-21 04:51:38 +02:00
twinaphex
c4b8fab0d0
Move menu_input_state to menu_state
2021-09-21 04:20:04 +02:00
twinaphex
f3b2e233bb
Move more code to menu_driver.c
2021-09-21 00:51:15 +02:00
twinaphex
abebf4a421
Cleanups
2021-09-21 00:41:52 +02:00
twinaphex
ec55f8188a
Move code out of retroarch.c and into menu/menu_driver.c
2021-09-21 00:12:26 +02:00
twinaphex
e2e236f1bf
Create menu_state_get_ptr()
2021-09-21 00:00:50 +02:00
twinaphex
94b5769375
Cleanups
2021-09-20 21:21:54 +02:00
twinaphex
d2af43d457
Cleanups
2021-09-20 21:08:53 +02:00