Commit graph

101 commits

Author SHA1 Message Date
Kp a40d1efcd0 Sort joystick data smallest first 2015-11-01 21:15:40 +00:00
Kp 6111e5adbf Allow configuring max joysticks at build time 2015-11-01 21:15:40 +00:00
Kp 37bffb75dd Use std::tuple for storing d_physical_joystick members
Simplify later cleanup by hiding the members behind accessors.
2015-11-01 21:15:39 +00:00
Kp b639ba151a Remove unused joystick globals n_axes,n_buttons,n_hats
These are used only in one function.  Make them local only.
2015-11-01 21:15:39 +00:00
Kp 04ee450a07 Take local references to joystick text 2015-11-01 21:15:39 +00:00
Kp 78de0ac119 Add fwd-event.h with forward declarations of event.h 2015-10-09 02:46:10 +00:00
Kp e8a4a25639 Use template alias for window_subfunction_t 2015-10-09 02:46:10 +00:00
zico 708372a148 Included compiler-range_for.h into joy.cpp to fix compiler error of undefined range_for 2015-09-29 12:02:49 +02:00
Kp 9642a4c31d Close SDL joystick handles at shutdown 2015-09-29 02:41:22 +00:00
Kp e5dff6d63f Use array<> for d_physical_joystick hat_map, button_map 2015-09-29 02:41:22 +00:00
Kp 46bbdd43af Move Joystick.n_axes, Joystick.n_buttons into local scope 2015-09-29 02:41:22 +00:00
Kp 7821af1303 Move axis values into individual joysticks
SDL2 allows joysticks to come and go.  This conflicts with the unified
virtual joystick.
2015-09-19 23:04:35 +00:00
Kp 21be29e0d4 Optimize out button_last_state
This shrinks struct Joystick and makes joy_hat_handler much shorter.
2015-09-19 23:04:34 +00:00
Kp 69e3762933 Return joystick axis values by reference 2015-09-19 23:04:34 +00:00
Kp 38dc303bf8 Simplify joy_flush 2015-09-19 23:04:34 +00:00
Kp 8185991062 Ignore excess joysticks 2015-09-13 21:02:19 +00:00
Kp 17b1943c5e Mark various per-file structures as static 2015-08-12 03:11:46 +00:00
Kp bc7c469ab2 Use array<> for more globals 2015-08-12 03:11:46 +00:00
Kp 9bfea35e4f Use forward-declaration header for gr.h 2015-07-25 23:10:45 +00:00
Kp cfdffa184f Move similar/arch/sdl/event.cpp -> common/arch/sdl/event.cpp 2015-07-18 21:01:56 +00:00
Kp 04d9f82a50 Move similar/arch/sdl/key.cpp -> common/arch/sdl/key.cpp 2015-07-18 21:01:56 +00:00
Kp c7542fe9fc Move similar/arch/sdl/mouse.cpp -> common/arch/sdl/mouse.cpp 2015-07-18 21:01:56 +00:00
Kp bbcdf9f7d2 Fix LTO -Wodr for GameCfg 2015-07-18 03:49:47 +00:00
Kp 19ed586988 SDL2: SDL_JoystickName parameter changed 2015-07-14 02:42:12 +00:00
Kp b822f4c049 Simplify joystick setup 2015-07-14 02:42:12 +00:00
Kp c03fe30fc2 Move similar/arch/sdl/timer.cpp -> common/arch/sdl/timer.cpp 2015-07-04 21:01:17 +00:00
Kp 371838c74e Use unique_ptr to manage GLsync fence 2015-05-09 17:39:01 +00:00
Kp 5a2c11c7ad Precompute OGL sync wait_timeout milliseconds 2015-05-09 17:39:01 +00:00
Kp 6792c1bc4b Enable -Wunused-parameter 2015-04-26 20:15:56 +00:00
Kp ff83ba95b6 Remove unused ogl_extensions_init return value 2015-03-25 01:59:21 +00:00
Kp 694c522756 Use array<> for OpenGL extension version 2015-03-25 01:59:20 +00:00
derhass bf723efd48 use C++ style reinterpret_casts to pointers from SDL_GetProcAddress to function pointer types 2015-03-23 20:06:23 +01:00
derhass 6d41224638 move GL synchronization code into its own class 2015-03-22 21:19:06 +01:00
derhass db267af6f2 add basic OpenGL extension handling
Currently only used for fence sync objects.
2015-03-22 20:32:14 +01:00
Kp 1f5190bcfd Fix resource leak closing SDL RW ops
Leak introduced in b3d134a6b7 ("merged
physfs branch"), but this fix only applies after the conversion to RAII.
An equivalent change from SDL_FreeRW->SDL_RWclose is needed for pre-RAII
code.

Fixes: d0de0cf963 ("Use unique_ptr for SDL_RWops")
2015-02-28 22:34:07 +00:00
Kp 40fd988a0f Hide local classes in anonymous namespaces 2015-01-23 03:55:06 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 68d705a85a Use bool conversion to test PHYSFS_File pointer 2015-01-17 18:31:42 +00:00
Kp 28a31a223f Centralize window_close calls 2015-01-17 18:31:41 +00:00
Kp 9a3796d9d1 Pass window_get_next arg by & 2015-01-17 18:31:41 +00:00
Kp 3bf1fd573c Pass window_select arg by & 2015-01-17 18:31:41 +00:00
Kp 4984f46ef4 Pass window_set_visible arg by & 2015-01-17 18:31:41 +00:00
Kp 88bc7454f5 Pass window_is_visible arg by & 2015-01-17 18:31:41 +00:00
Kp b2a8c4502e Pass window_set_modal arg by & 2015-01-17 18:31:41 +00:00
Kp e7c632b741 Pass window_is_modal arg by & 2015-01-17 18:31:40 +00:00
Kp ee50d45e72 Pass window_send_event arg by & 2015-01-17 18:31:40 +00:00
Kp c731558a94 Pass gr_init_sub_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp c2b7990550 Pass window_get_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp f1885ee4d4 Pass creation context to new windows 2014-12-20 04:36:09 +00:00
Bradley Bell 0cc88280ba Simplify by using generic Info.plist, builtin substitions 2014-12-04 18:11:57 -08:00