Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Jan 20, 2025
1 parent 1f2b299 commit 350e4fa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
36 changes: 17 additions & 19 deletions gfx/common/d3d9_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,14 @@

RETRO_BEGIN_DECLS

typedef struct d3d9_video d3d9_video_t;

typedef struct d3d9_video
{
bool keep_aspect;
bool should_resize;
bool quitting;
bool needs_restore;
bool overlays_enabled;
/* TODO - refactor this away properly. */
bool resolution_hd_enable;

/* Only used for Xbox */
bool widescreen_mode;

unsigned cur_mon_id;
unsigned dev_rotation;

overlay_t *menu;
void *renderchain_data;

char *shader_path;
overlay_t *overlays;

RECT font_rect;
RECT font_rect_shifted;
math_matrix_4x4 mvp;
Expand All @@ -81,8 +68,6 @@ typedef struct d3d9_video
float translate_x;
float translate_y;

char *shader_path;

struct
{
int size;
Expand All @@ -92,7 +77,20 @@ typedef struct d3d9_video
}menu_display;

size_t overlays_size;
overlay_t *overlays;

unsigned cur_mon_id;
unsigned dev_rotation;

bool keep_aspect;
bool should_resize;
bool quitting;
bool needs_restore;
bool overlays_enabled;
/* TODO - refactor this away properly. */
bool resolution_hd_enable;

/* Only used for Xbox */
bool widescreen_mode;
} d3d9_video_t;

void *d3d9_vertex_buffer_new(void *dev,
Expand Down
4 changes: 4 additions & 0 deletions gfx/video_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4670,7 +4670,9 @@ void video_frame_delay_auto(video_driver_state_t *video_st, video_frame_delay_au
uint8_t count_pos = 0;
uint8_t count_min = 0;
uint8_t count_med = 0;
#if FRAME_DELAY_AUTO_DEBUG
uint8_t count_max = 0;
#endif
int8_t mode = 0;

/* Calculate average frame time */
Expand Down Expand Up @@ -4699,8 +4701,10 @@ void video_frame_delay_auto(video_driver_state_t *video_st, video_frame_delay_au
count_min++;
if (frame_time_i > frame_time_limit_med)
count_med++;
#if FRAME_DELAY_AUTO_DEBUG
if (frame_time_i > frame_time_limit_max)
count_max++;
#endif
}

frame_time_avg += frame_time_i;
Expand Down

0 comments on commit 350e4fa

Please sign in to comment.