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
6792c1bc4b
Enable -Wunused-parameter
2015-04-26 20:15:56 +00: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
3daa0f63b1
Add search SDL_mixer framework paths for headers instead of using <Framework/Header.h> notation
2014-12-03 15:14:18 -08:00
Kp
ef539be1ab
Pass gr_init_bitmap_data arg by &
2014-11-30 22:09:21 +00:00
Kp
a8f853aa7a
Pass d_event arg by const&
2014-10-04 22:36:13 +00:00
Kp
8750b6a4ad
Switch d_event subclasses to C++ inheritance
2014-10-04 18:05:26 +00:00
Kp
488713fe93
Propagate for variables in common/arch/sdl/rbaudio.cpp
2014-09-26 02:42:14 +00:00
Kp
e2d6174694
Propagate for variables in common/arch/sdl/joy.cpp
2014-09-26 02:42:14 +00:00
Kp
2c8a07cfa7
Use vector<uint8_t> to manage current_music_hndlbuf
2014-09-20 23:14:03 +00:00
Kp
2f7b9a7aa7
Use C++ memory management for window
2014-09-17 02:45:23 +00:00
Kp
e77f02700a
Use unique_ptr for current_music
2014-08-27 02:52:21 +00:00
Kp
4acbb40ad7
Use enum for window event result
2014-08-07 02:47:48 +00:00
Kp
5c5eb1f1f7
Let WINDOW_SEND_EVENT return a value
2014-08-05 02:34:06 +00:00
Kp
ee32a200ea
Change window_create<void> to be non-template
2014-08-05 02:33:40 +00:00
Kp
a6dcfa2e30
Simplify audio CD discovery
2014-07-22 23:48:23 +00:00
Kp
2a8e0a78c6
Use partial_range with RBAudio
2014-07-14 02:17:40 +00:00
Kp
5339c4873a
Use assignment to clear Joystick
2014-07-04 03:43:01 +00:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00
Kp
094dfbf3d4
Reduce header inclusions
2013-12-31 03:22:03 +00:00
Kp
073f00974a
Eliminate uses of the typedef struct X { ... } X; pattern
...
C++ does not require this pattern.
import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
m = to.match(line)
if m:
osn = m.group(1)
print 'struct %s\n{' % osn
continue
if osn:
m = tc.match(line)
if m:
csn = m.group(2)
if osn == csn:
print '}%s;' % m.group(1)
osn = None
continue
else:
osn = None
print line,
2013-12-28 22:48:07 +00:00