mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 10:21:26 +00:00
Struct reorderings
This commit is contained in:
parent
023fd4f330
commit
659d50c916
@ -117,61 +117,67 @@ typedef struct disp_widget_msg
|
||||
{
|
||||
char *msg;
|
||||
char *msg_new;
|
||||
float msg_transition_animation;
|
||||
retro_task_t *task_ptr;
|
||||
/* Used to detect title change */
|
||||
char *task_title_ptr;
|
||||
|
||||
uint32_t task_ident;
|
||||
unsigned msg_len;
|
||||
unsigned duration;
|
||||
|
||||
unsigned text_height;
|
||||
unsigned width;
|
||||
|
||||
float msg_transition_animation;
|
||||
float offset_y;
|
||||
float alpha;
|
||||
float unfold;
|
||||
float hourglass_rotation;
|
||||
gfx_timer_t hourglass_timer; /* float alignment */
|
||||
gfx_timer_t expiration_timer; /* float alignment */
|
||||
|
||||
int8_t task_progress;
|
||||
/* How many tasks have used this notification? */
|
||||
uint8_t task_count;
|
||||
|
||||
bool task_finished;
|
||||
bool task_error;
|
||||
bool task_cancelled;
|
||||
bool expiration_timer_started;
|
||||
/* Is it currently doing the fade out animation ? */
|
||||
bool dying;
|
||||
/* Has the timer expired ? if so, should be set to dying */
|
||||
bool expired;
|
||||
unsigned width;
|
||||
|
||||
gfx_timer_t expiration_timer;
|
||||
bool expiration_timer_started;
|
||||
|
||||
retro_task_t *task_ptr;
|
||||
/* Used to detect title change */
|
||||
char *task_title_ptr;
|
||||
/* How many tasks have used this notification? */
|
||||
uint8_t task_count;
|
||||
|
||||
int8_t task_progress;
|
||||
bool task_finished;
|
||||
bool task_error;
|
||||
bool task_cancelled;
|
||||
uint32_t task_ident;
|
||||
|
||||
/* Unfold animation */
|
||||
bool unfolded;
|
||||
bool unfolding;
|
||||
float unfold;
|
||||
|
||||
float hourglass_rotation;
|
||||
gfx_timer_t hourglass_timer;
|
||||
} disp_widget_msg_t;
|
||||
|
||||
typedef struct dispgfx_widget
|
||||
{
|
||||
/* There can only be one message animation at a time to
|
||||
* avoid confusing users */
|
||||
bool widgets_moving;
|
||||
bool widgets_inited;
|
||||
bool msg_queue_has_icons;
|
||||
uint64_t gfx_widgets_frame_count;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
slock_t* current_msgs_lock;
|
||||
#endif
|
||||
fifo_buffer_t *msg_queue;
|
||||
disp_widget_msg_t* current_msgs[MSG_QUEUE_ONSCREEN_MAX];
|
||||
|
||||
#ifdef HAVE_TRANSLATE
|
||||
uintptr_t ai_service_overlay_texture;
|
||||
#endif
|
||||
uintptr_t msg_queue_icon;
|
||||
uintptr_t msg_queue_icon_outline;
|
||||
uintptr_t msg_queue_icon_rect;
|
||||
uintptr_t gfx_widgets_icons_textures[
|
||||
MENU_WIDGETS_ICON_LAST];
|
||||
uintptr_t gfx_widgets_generic_tag;
|
||||
|
||||
size_t current_msgs_size;
|
||||
|
||||
#ifdef HAVE_TRANSLATE
|
||||
int ai_service_overlay_state;
|
||||
#endif
|
||||
float last_scale_factor;
|
||||
#ifdef HAVE_TRANSLATE
|
||||
unsigned ai_service_overlay_width;
|
||||
unsigned ai_service_overlay_height;
|
||||
#endif
|
||||
|
||||
unsigned last_video_width;
|
||||
unsigned last_video_height;
|
||||
unsigned msg_queue_kill;
|
||||
@ -202,26 +208,21 @@ typedef struct dispgfx_widget
|
||||
unsigned msg_queue_task_hourglass_x;
|
||||
unsigned divider_width_1px;
|
||||
|
||||
uint64_t gfx_widgets_frame_count;
|
||||
|
||||
float last_scale_factor;
|
||||
#ifdef HAVE_TRANSLATE
|
||||
uintptr_t ai_service_overlay_texture;
|
||||
unsigned ai_service_overlay_width;
|
||||
unsigned ai_service_overlay_height;
|
||||
#endif
|
||||
uintptr_t msg_queue_icon;
|
||||
uintptr_t msg_queue_icon_outline;
|
||||
uintptr_t msg_queue_icon_rect;
|
||||
uintptr_t gfx_widgets_icons_textures[
|
||||
MENU_WIDGETS_ICON_LAST];
|
||||
|
||||
gfx_widget_fonts_t gfx_widget_fonts;
|
||||
|
||||
char gfx_widgets_status_text[255];
|
||||
uintptr_t gfx_widgets_generic_tag;
|
||||
gfx_widget_fonts_t gfx_widget_fonts;
|
||||
fifo_buffer_t *msg_queue;
|
||||
disp_widget_msg_t* current_msgs[MSG_QUEUE_ONSCREEN_MAX];
|
||||
size_t current_msgs_size;
|
||||
#ifdef HAVE_THREADS
|
||||
slock_t* current_msgs_lock;
|
||||
#endif
|
||||
|
||||
/* There can only be one message animation at a time to
|
||||
* avoid confusing users */
|
||||
bool widgets_moving;
|
||||
bool widgets_inited;
|
||||
bool msg_queue_has_icons;
|
||||
} dispgfx_widget_t;
|
||||
|
||||
|
||||
|
@ -56,10 +56,10 @@ LPDIRECTINPUT8 g_dinput_ctx;
|
||||
|
||||
struct pointer_status
|
||||
{
|
||||
struct pointer_status *next;
|
||||
int pointer_id;
|
||||
int pointer_x;
|
||||
int pointer_y;
|
||||
struct pointer_status *next;
|
||||
};
|
||||
|
||||
struct dinput_input
|
||||
@ -68,7 +68,7 @@ struct dinput_input
|
||||
LPDIRECTINPUTDEVICE8 keyboard;
|
||||
LPDIRECTINPUTDEVICE8 mouse;
|
||||
const input_device_driver_t *joypad;
|
||||
uint8_t state[256];
|
||||
struct pointer_status pointer_head; /* dummy head for easier iteration */
|
||||
|
||||
int window_pos_x;
|
||||
int window_pos_y;
|
||||
@ -76,9 +76,9 @@ struct dinput_input
|
||||
int mouse_rel_y;
|
||||
int mouse_x;
|
||||
int mouse_y;
|
||||
uint8_t state[256];
|
||||
bool doubleclick_on_titlebar;
|
||||
bool mouse_l, mouse_r, mouse_m, mouse_b4, mouse_b5, mouse_wu, mouse_wd, mouse_hwu, mouse_hwd;
|
||||
struct pointer_status pointer_head; /* dummy head for easier iteration */
|
||||
};
|
||||
|
||||
void dinput_destroy_context(void)
|
||||
@ -783,25 +783,24 @@ static void dinput_add_pointer(struct dinput_input *di,
|
||||
{
|
||||
struct pointer_status *insert_pos = NULL;
|
||||
|
||||
new_pointer->next = NULL;
|
||||
insert_pos = &di->pointer_head;
|
||||
new_pointer->next = NULL;
|
||||
insert_pos = &di->pointer_head;
|
||||
|
||||
while (insert_pos->next)
|
||||
insert_pos = insert_pos->next;
|
||||
insert_pos->next = new_pointer;
|
||||
insert_pos = insert_pos->next;
|
||||
insert_pos->next = new_pointer;
|
||||
}
|
||||
|
||||
static void dinput_delete_pointer(struct dinput_input *di, int pointer_id)
|
||||
{
|
||||
struct pointer_status *check_pos = &di->pointer_head;
|
||||
struct pointer_status *check_pos = &di->pointer_head;
|
||||
|
||||
while (check_pos && check_pos->next)
|
||||
{
|
||||
if (check_pos->next->pointer_id == pointer_id)
|
||||
{
|
||||
struct pointer_status *to_delete = check_pos->next;
|
||||
|
||||
check_pos->next = check_pos->next->next;
|
||||
check_pos->next = check_pos->next->next;
|
||||
free(to_delete);
|
||||
}
|
||||
check_pos = check_pos->next;
|
||||
|
@ -40,14 +40,12 @@
|
||||
|
||||
struct nbio_linux_t
|
||||
{
|
||||
int fd;
|
||||
bool busy;
|
||||
|
||||
void* ptr;
|
||||
aio_context_t ctx;
|
||||
struct iocb cb;
|
||||
|
||||
void* ptr;
|
||||
size_t len;
|
||||
int fd;
|
||||
bool busy;
|
||||
};
|
||||
|
||||
/* there's also a Unix AIO thingy, but it's not in glibc
|
||||
|
@ -31,10 +31,11 @@
|
||||
|
||||
struct nbio_orbis_t
|
||||
{
|
||||
int fd;
|
||||
void* data;
|
||||
size_t progress;
|
||||
size_t len;
|
||||
int fd;
|
||||
unsigned int mode;
|
||||
/*
|
||||
* possible values:
|
||||
* NBIO_READ, NBIO_WRITE - obvious
|
||||
@ -42,7 +43,6 @@ struct nbio_orbis_t
|
||||
* -2 - the pointer was reallocated since the last operation
|
||||
*/
|
||||
signed char op;
|
||||
unsigned int mode;
|
||||
};
|
||||
|
||||
static void *nbio_orbis_open(const char * filename, unsigned int mode)
|
||||
|
@ -55,10 +55,10 @@
|
||||
|
||||
struct nbio_mmap_unix_t
|
||||
{
|
||||
void* ptr;
|
||||
size_t len;
|
||||
int fd;
|
||||
int map_flags;
|
||||
size_t len;
|
||||
void* ptr;
|
||||
};
|
||||
|
||||
static void *nbio_mmap_unix_open(const char * filename, unsigned mode)
|
||||
|
@ -63,9 +63,9 @@
|
||||
struct nbio_mmap_win32_t
|
||||
{
|
||||
HANDLE file;
|
||||
bool is_write;
|
||||
size_t len;
|
||||
void* ptr;
|
||||
size_t len;
|
||||
bool is_write;
|
||||
};
|
||||
|
||||
static void *nbio_mmap_win32_open(const char * filename, unsigned mode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user