Turn int variables to unsigned

This commit is contained in:
twinaphex 2018-04-15 18:59:58 +02:00
parent 311c156e08
commit bed4214059
1 changed files with 23 additions and 20 deletions

View File

@ -35,7 +35,8 @@ static unsigned ra_tmp_height = 0;
static unsigned ra_set_core_hz = 0;
static unsigned orig_width = 0;
static unsigned orig_height = 0;
static int first_run = 0;
static bool first_run = true;
static float ra_tmp_core_hz = 0.0f;
static float fly_aspect = 0.0f;
@ -43,19 +44,21 @@ static float ra_core_hz = 0.0f;
static void crt_check_first_run(void)
{
if (first_run != 1)
{
if (!first_run)
return;
/* TODO/FIXME - do we want to set first_run back to true
* at some point in time or should it stay like this? */
/* Run of first boot to get current display resolution */
#if defined(_WIN32)
orig_height = GetSystemMetrics(SM_CYSCREEN);
orig_width = GetSystemMetrics(SM_CXSCREEN);
#endif
first_run = false;
}
first_run = 1;
}
static void crt_switch_res(int width, int height,
static void crt_switch_res(unsigned width, unsigned height,
int f_restore, int ra_hz)
{
/* Windows function to switch resolutions */
@ -150,14 +153,14 @@ static void switch_crt_hz(void)
ra_tmp_core_hz = ra_core_hz;
}
static void crt_aspect_ratio_switch(int width, int height)
static void crt_aspect_ratio_switch(unsigned width, unsigned height)
{
/* send aspect float to videeo_driver */
fly_aspect = (float)width / height;
video_driver_set_aspect_ratio_value((float)fly_aspect);
}
static void switch_res_crt(int width, int height)
static void switch_res_crt(unsigned width, unsigned height)
{
if (height > 100)
{
@ -167,7 +170,7 @@ static void switch_res_crt(int width, int height)
}
/* Create correct aspect to fit video if resolution does not exist */
static void crt_screen_setup_aspect(int width, int height)
static void crt_screen_setup_aspect(unsigned width, unsigned height)
{
switch_crt_hz();