summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-15 21:47:30 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-15 21:47:30 +0000
commitab97dc30efdd5cc1abf8c65b8ce29af364219167 (patch)
tree5ab46b3c21f6e0e4173a79a4151e019b3f2dc17e /src/osd/sdl
parentd1da89cc7817315f05269205a3f56d36ebba170b (diff)
First pass at modernizing struct definitions.
Diffstat (limited to 'src/osd/sdl')
-rw-r--r--src/osd/sdl/debugwin.c3
-rw-r--r--src/osd/sdl/draw13.c9
-rw-r--r--src/osd/sdl/drawogl.c6
-rw-r--r--src/osd/sdl/drawsdl.c3
-rw-r--r--src/osd/sdl/gl_shader_mgr.h3
-rw-r--r--src/osd/sdl/input.c24
-rw-r--r--src/osd/sdl/sdlsync_sdl.c3
-rw-r--r--src/osd/sdl/sdlsync_tc.c3
-rw-r--r--src/osd/sdl/sdlwork.c3
-rw-r--r--src/osd/sdl/testkeys.c4
-rw-r--r--src/osd/sdl/video.h12
-rw-r--r--src/osd/sdl/window.c3
-rw-r--r--src/osd/sdl/window.h6
13 files changed, 27 insertions, 55 deletions
diff --git a/src/osd/sdl/debugwin.c b/src/osd/sdl/debugwin.c
index c4e4330c4b4..fb99313c38a 100644
--- a/src/osd/sdl/debugwin.c
+++ b/src/osd/sdl/debugwin.c
@@ -58,8 +58,7 @@ typedef struct hentry {
typedef struct _win_i win_i;
-typedef struct _edit edit;
-struct _edit {
+struct edit {
GtkEntry *edit_w;
struct hentry *h, *ch;
char *hold;
diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c
index 4cf0a6126e0..ab41b544391 100644
--- a/src/osd/sdl/draw13.c
+++ b/src/osd/sdl/draw13.c
@@ -58,8 +58,7 @@ enum
//============================================================
-typedef struct _quad_setup_data quad_setup_data;
-struct _quad_setup_data
+struct quad_setup_data
{
INT32 dudx, dvdx, dudy, dvdy;
INT32 startu, startv;
@@ -70,8 +69,7 @@ typedef struct _texture_info texture_info;
typedef void (*texture_copy_func)(texture_info *texture, const render_texinfo *texsource);
-typedef struct _copy_info copy_info;
-struct _copy_info {
+struct copy_info {
int src_fmt;
Uint32 dst_fmt;
int dst_bpp;
@@ -117,8 +115,7 @@ struct _texture_info
};
/* sdl_info is the information about SDL for the current screen */
-typedef struct _sdl_info sdl_info;
-struct _sdl_info
+struct sdl_info
{
INT32 blittimer;
UINT32 extra_flags;
diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c
index be744ea0003..f34f8732959 100644
--- a/src/osd/sdl/drawogl.c
+++ b/src/osd/sdl/drawogl.c
@@ -213,8 +213,7 @@ struct _texture_info
};
/* sdl_info is the information about SDL for the current screen */
-typedef struct _sdl_info sdl_info;
-struct _sdl_info
+struct sdl_info
{
INT32 blittimer;
UINT32 extra_flags;
@@ -269,8 +268,7 @@ struct _sdl_info
};
/* line_aa_step is used for drawing antialiased lines */
-typedef struct _line_aa_step line_aa_step;
-struct _line_aa_step
+struct line_aa_step
{
float xoffs, yoffs; // X/Y deltas
float weight; // weight contribution
diff --git a/src/osd/sdl/drawsdl.c b/src/osd/sdl/drawsdl.c
index 8fa25bdd148..2bb1a809b43 100644
--- a/src/osd/sdl/drawsdl.c
+++ b/src/osd/sdl/drawsdl.c
@@ -46,8 +46,7 @@ typedef struct _sdl_scale_mode sdl_scale_mode;
#endif
/* sdl_info is the information about SDL for the current screen */
-typedef struct _sdl_info sdl_info;
-struct _sdl_info
+struct sdl_info
{
INT32 blittimer;
UINT32 extra_flags;
diff --git a/src/osd/sdl/gl_shader_mgr.h b/src/osd/sdl/gl_shader_mgr.h
index 9eee4b1e757..595e0a68e49 100644
--- a/src/osd/sdl/gl_shader_mgr.h
+++ b/src/osd/sdl/gl_shader_mgr.h
@@ -22,8 +22,7 @@ typedef enum {
// old code passed sdl_info * to functions here
// however the parameter was not used
// changed interface to more generic one.
-typedef struct _glsl_shader_info glsl_shader_info;
-struct _glsl_shader_info
+struct glsl_shader_info
{
int dummy; // avoid compiler breakage
};
diff --git a/src/osd/sdl/input.c b/src/osd/sdl/input.c
index 77f7f4a19cb..75aa92fcdd6 100644
--- a/src/osd/sdl/input.c
+++ b/src/osd/sdl/input.c
@@ -88,8 +88,7 @@ static int proximity_out_type = INVALID_EVENT_TYPE;
//============================================================
// state information for a keyboard
-typedef struct _keyboard_state keyboard_state;
-struct _keyboard_state
+struct keyboard_state
{
INT32 state[0x3ff]; // must be INT32!
INT8 oldkey[MAX_KEYS];
@@ -98,8 +97,7 @@ struct _keyboard_state
// state information for a mouse
-typedef struct _mouse_state mouse_state;
-struct _mouse_state
+struct mouse_state
{
INT32 lX, lY;
INT32 buttons[MAX_BUTTONS];
@@ -107,8 +105,7 @@ struct _mouse_state
// state information for a joystick; DirectInput state must be first element
-typedef struct _joystick_state joystick_state;
-struct _joystick_state
+struct joystick_state
{
SDL_Joystick *device;
INT32 axes[MAX_AXES];
@@ -119,8 +116,7 @@ struct _joystick_state
#if (USE_XINPUT)
// state information for a lightgun
-typedef struct _lightgun_state lightgun_state;
-struct _lightgun_state
+struct lightgun_state
{
INT32 lX, lY;
INT32 buttons[MAX_BUTTONS];
@@ -131,8 +127,7 @@ struct _lightgun_state
#endif
// generic device information
-typedef struct _device_info device_info;
-struct _device_info
+struct device_info
{
// device information
device_info ** head;
@@ -187,8 +182,7 @@ static device_info * joystick_list;
// joystick mapper
-typedef struct _device_map_t device_map_t;
-struct _device_map_t
+struct device_map_t
{
struct {
char *name;
@@ -236,8 +230,7 @@ static device_info *generic_device_find_index(device_info *devlist_head, int ind
//============================================================
// master keyboard translation table
-typedef struct _kt_table kt_table;
-struct _kt_table {
+struct kt_table {
input_item_id mame_key;
INT32 sdl_key;
//const char * vkey;
@@ -503,8 +496,7 @@ static kt_table sdl_key_trans_table[] =
};
#endif
-typedef struct _key_lookup_table key_lookup_table;
-struct _key_lookup_table
+struct key_lookup_table
{
int code;
const char *name;
diff --git a/src/osd/sdl/sdlsync_sdl.c b/src/osd/sdl/sdlsync_sdl.c
index 09107dbd401..734cbcc67f0 100644
--- a/src/osd/sdl/sdlsync_sdl.c
+++ b/src/osd/sdl/sdlsync_sdl.c
@@ -28,8 +28,7 @@
#else
#define LOG( x )
#endif
-typedef struct _hidden_mutex_t hidden_mutex_t;
-struct _hidden_mutex_t {
+struct hidden_mutex_t {
SDL_mutex * id;
volatile INT32 locked;
volatile INT32 threadid;
diff --git a/src/osd/sdl/sdlsync_tc.c b/src/osd/sdl/sdlsync_tc.c
index fc7b7c32cce..d1ad72e9bde 100644
--- a/src/osd/sdl/sdlsync_tc.c
+++ b/src/osd/sdl/sdlsync_tc.c
@@ -34,8 +34,7 @@
#include <signal.h>
#include <sys/time.h>
-typedef struct _hidden_mutex_t hidden_mutex_t;
-struct _hidden_mutex_t {
+struct hidden_mutex_t {
pthread_mutex_t id;
};
diff --git a/src/osd/sdl/sdlwork.c b/src/osd/sdl/sdlwork.c
index 74cb625d755..df9aae7efbe 100644
--- a/src/osd/sdl/sdlwork.c
+++ b/src/osd/sdl/sdlwork.c
@@ -71,8 +71,7 @@ int osd_num_processors = 0;
// TYPE DEFINITIONS
//============================================================
-typedef struct _work_thread_info work_thread_info;
-struct _work_thread_info
+struct work_thread_info
{
osd_work_queue * queue; // pointer back to the queue
osd_thread * handle; // handle to the thread
diff --git a/src/osd/sdl/testkeys.c b/src/osd/sdl/testkeys.c
index d7ba3352e5b..2530948dfe7 100644
--- a/src/osd/sdl/testkeys.c
+++ b/src/osd/sdl/testkeys.c
@@ -19,9 +19,7 @@
#include "unicode.h"
-typedef struct _key_lookup_table key_lookup_table;
-
-struct _key_lookup_table
+struct key_lookup_table
{
int code;
const char *name;
diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h
index e143abd7324..38648c68ee8 100644
--- a/src/osd/sdl/video.h
+++ b/src/osd/sdl/video.h
@@ -50,15 +50,13 @@ enum {
// TYPE DEFINITIONS
//============================================================
-typedef struct _sdl_mode sdl_mode;
-struct _sdl_mode
+struct sdl_mode
{
int width;
int height;
};
-typedef struct _sdl_monitor_info sdl_monitor_info;
-struct _sdl_monitor_info
+struct sdl_monitor_info
{
sdl_monitor_info * next; // pointer to next monitor in list
#ifdef PTR64
@@ -75,8 +73,7 @@ struct _sdl_monitor_info
};
-typedef struct _sdl_window_config sdl_window_config;
-struct _sdl_window_config
+struct sdl_window_config
{
float aspect; // decoded aspect ratio
int width; // decoded width
@@ -88,8 +85,7 @@ struct _sdl_window_config
};
-typedef struct _sdl_video_config sdl_video_config;
-struct _sdl_video_config
+struct sdl_video_config
{
// performance options
int novideo; // don't draw, for pure CPU benchmarking
diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c
index 933ad22fa1e..ada463b042d 100644
--- a/src/osd/sdl/window.c
+++ b/src/osd/sdl/window.c
@@ -100,8 +100,7 @@ static SDL_threadID window_threadid;
static sdl_draw_info draw;
-typedef struct _worker_param worker_param;
-struct _worker_param {
+struct worker_param {
running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
sdl_window_info *window;
render_primitive_list *list;
diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h
index b5d98aaa891..352ed0d17e4 100644
--- a/src/osd/sdl/window.h
+++ b/src/osd/sdl/window.h
@@ -32,8 +32,7 @@ typedef UINT32 HashT;
// TYPE DEFINITIONS
//============================================================
-typedef struct _sdl_window_info sdl_window_info;
-struct _sdl_window_info
+struct sdl_window_info
{
// Pointer to next window
sdl_window_info * next;
@@ -101,8 +100,7 @@ struct _sdl_window_info
#endif
};
-typedef struct _sdl_draw_info sdl_draw_info;
-struct _sdl_draw_info
+struct sdl_draw_info
{
void (*exit)(void);
void (*attach)(sdl_draw_info *info, sdl_window_info *window);