diff --git a/gfx/common/metal_common.m b/gfx/common/metal_common.m index 0c16172280..f7735b2f21 100644 --- a/gfx/common/metal_common.m +++ b/gfx/common/metal_common.m @@ -261,7 +261,7 @@ _viewport->full_width = width; _viewport->full_height = height; - video_driver_set_size(&_viewport->full_width, &_viewport->full_height); + video_driver_set_size(_viewport->full_width, _viewport->full_height); _layer.drawableSize = CGSizeMake(width, height); video_driver_update_viewport(_viewport, forceFull, _keepAspect); diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 4ba62e5f07..33c1f366c0 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -62,7 +62,7 @@ static void caca_gfx_create(void) caca_dither = caca_create_dither(16, caca_video_width, caca_video_height, caca_video_pitch, 0xf800, 0x7e0, 0x1f, 0x0); - video_driver_set_size(&caca_video_width, &caca_video_height); + video_driver_set_size(caca_video_width, caca_video_height); } static void *caca_gfx_init(const video_info_t *video, @@ -192,7 +192,7 @@ static void caca_gfx_set_nonblock_state(void *data, bool toggle) static bool caca_gfx_alive(void *data) { (void)data; - video_driver_set_size(&caca_video_width, &caca_video_height); + video_driver_set_size(caca_video_width, caca_video_height); return true; } diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 6a5e3c90fc..c8a7075a9f 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -345,7 +345,7 @@ static void* ctr_init(const video_info_t* video, ctr->vp.height = CTR_TOP_FRAMEBUFFER_HEIGHT; ctr->vp.full_width = CTR_TOP_FRAMEBUFFER_WIDTH; ctr->vp.full_height = CTR_TOP_FRAMEBUFFER_HEIGHT; - video_driver_set_size(&ctr->vp.width, &ctr->vp.height); + video_driver_set_size(ctr->vp.width, ctr->vp.height); ctr->drawbuffers.top.left = vramAlloc(CTR_TOP_FRAMEBUFFER_WIDTH * CTR_TOP_FRAMEBUFFER_HEIGHT * 2 * sizeof(uint32_t)); ctr->drawbuffers.top.right = (void*)((uint32_t*)ctr->drawbuffers.top.left + CTR_TOP_FRAMEBUFFER_WIDTH * CTR_TOP_FRAMEBUFFER_HEIGHT); diff --git a/gfx/drivers/d3d10.c b/gfx/drivers/d3d10.c index 1a7a40931a..d8769dcd9b 100644 --- a/gfx/drivers/d3d10.c +++ b/gfx/drivers/d3d10.c @@ -700,7 +700,7 @@ static void *d3d10_gfx_init(const video_info_t* video, D3D10SetRenderTargets(d3d10->device, 1, &d3d10->renderTargetView, NULL); - video_driver_set_size(&d3d10->vp.full_width, &d3d10->vp.full_height); + video_driver_set_size(d3d10->vp.full_width, d3d10->vp.full_height); d3d10->viewport.Width = d3d10->vp.full_width; d3d10->viewport.Height = d3d10->vp.full_height; d3d10->resize_viewport = true; @@ -1222,7 +1222,7 @@ static bool d3d10_gfx_frame( d3d10->resize_chain = false; d3d10->resize_viewport = true; - video_driver_set_size(&video_info->width, &video_info->height); + video_driver_set_size(video_info->width, video_info->height); } PERF_START(); @@ -1540,8 +1540,10 @@ static bool d3d10_gfx_alive(void* data) win32_check_window(&quit, &d3d10->resize_chain, &d3d10->vp.full_width, &d3d10->vp.full_height); - if (d3d10->resize_chain && d3d10->vp.full_width != 0 && d3d10->vp.full_height != 0) - video_driver_set_size(&d3d10->vp.full_width, &d3d10->vp.full_height); + if ( d3d10->resize_chain + && d3d10->vp.full_width != 0 + && d3d10->vp.full_height != 0) + video_driver_set_size(d3d10->vp.full_width, d3d10->vp.full_height); return !quit; } diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index 3b9e601b6b..af2255f715 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -777,7 +777,7 @@ static void *d3d11_gfx_init(const video_info_t* video, D3D11SetRenderTargets(d3d11->context, 1, &d3d11->renderTargetView, NULL); - video_driver_set_size(&d3d11->vp.full_width, &d3d11->vp.full_height); + video_driver_set_size(d3d11->vp.full_width, d3d11->vp.full_height); d3d11->viewport.Width = d3d11->vp.full_width; d3d11->viewport.Height = d3d11->vp.full_height; d3d11->resize_viewport = true; @@ -1303,7 +1303,7 @@ static bool d3d11_gfx_frame( d3d11->resize_chain = false; d3d11->resize_viewport = true; - video_driver_set_size(&video_info->width, &video_info->height); + video_driver_set_size(video_info->width, video_info->height); } #ifdef __WINRT__ @@ -1619,7 +1619,7 @@ static bool d3d11_gfx_alive(void* data) win32_check_window(&quit, &d3d11->resize_chain, &d3d11->vp.full_width, &d3d11->vp.full_height); if (d3d11->resize_chain && d3d11->vp.full_width != 0 && d3d11->vp.full_height != 0) - video_driver_set_size(&d3d11->vp.full_width, &d3d11->vp.full_height); + video_driver_set_size(d3d11->vp.full_width, d3d11->vp.full_height); return !quit; } diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index 4d90b2392f..134b7816cf 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -992,7 +992,7 @@ static void *d3d12_gfx_init(const video_info_t* video, } d3d12_gfx_set_rotation(d3d12, 0); - video_driver_set_size(&d3d12->vp.full_width, &d3d12->vp.full_height); + video_driver_set_size(d3d12->vp.full_width, d3d12->vp.full_height); d3d12->chain.viewport.Width = d3d12->vp.full_width; d3d12->chain.viewport.Height = d3d12->vp.full_height; d3d12->resize_viewport = true; @@ -1194,7 +1194,7 @@ static bool d3d12_gfx_frame( d3d12->ubo_values.OutputSize.width = d3d12->chain.viewport.Width; d3d12->ubo_values.OutputSize.height = d3d12->chain.viewport.Height; - video_driver_set_size(&video_info->width, &video_info->height); + video_driver_set_size(video_info->width, video_info->height); } D3D12ResetCommandAllocator(d3d12->queue.allocator); @@ -1608,8 +1608,10 @@ static bool d3d12_gfx_alive(void* data) win32_check_window(&quit, &d3d12->resize_chain, &d3d12->vp.full_width, &d3d12->vp.full_height); - if (d3d12->resize_chain && d3d12->vp.full_width != 0 && d3d12->vp.full_height != 0) - video_driver_set_size(&d3d12->vp.full_width, &d3d12->vp.full_height); + if ( d3d12->resize_chain + && d3d12->vp.full_width != 0 + && d3d12->vp.full_height != 0) + video_driver_set_size(d3d12->vp.full_width, d3d12->vp.full_height); return !quit; } diff --git a/gfx/drivers/d3d8.c b/gfx/drivers/d3d8.c index 15a0f5847d..c9b34095ba 100644 --- a/gfx/drivers/d3d8.c +++ b/gfx/drivers/d3d8.c @@ -699,7 +699,7 @@ static void d3d8_make_d3dpp(void *data, unsigned height = 0; d3d8_get_video_size(d3d, &width, &height); - video_driver_set_size(&width, &height); + video_driver_set_size(width, height); #endif video_driver_get_size(&d3dpp->BackBufferWidth, &d3dpp->BackBufferHeight); @@ -1026,7 +1026,7 @@ static bool d3d8_set_resize(d3d8_video_t *d3d, RARCH_LOG("[D3D8]: Resize %ux%u.\n", new_width, new_height); d3d->video_info.width = new_width; d3d->video_info.height = new_height; - video_driver_set_size(&new_width, &new_height); + video_driver_set_size(new_width, new_height); return true; } @@ -1060,7 +1060,7 @@ static bool d3d8_alive(void *data) ret = !quit; if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return ret; } @@ -1168,7 +1168,7 @@ static bool d3d8_init_internal(d3d8_video_t *d3d, { unsigned new_width = info->fullscreen ? full_x : info->width; unsigned new_height = info->fullscreen ? full_y : info->height; - video_driver_set_size(&new_width, &new_height); + video_driver_set_size(new_width, new_height); } #ifdef HAVE_WINDOW diff --git a/gfx/drivers/d3d9.c b/gfx/drivers/d3d9.c index 2c01ef3241..432cd4c44d 100644 --- a/gfx/drivers/d3d9.c +++ b/gfx/drivers/d3d9.c @@ -98,7 +98,7 @@ static bool d3d9_set_resize(d3d9_video_t *d3d, RARCH_LOG("[D3D9]: Resize %ux%u.\n", new_width, new_height); d3d->video_info.width = new_width; d3d->video_info.height = new_height; - video_driver_set_size(&new_width, &new_height); + video_driver_set_size(new_width, new_height); return true; } @@ -709,7 +709,7 @@ void d3d9_make_d3dpp(void *data, unsigned width = 0; unsigned height = 0; d3d9_get_video_size(d3d, &width, &height); - video_driver_set_size(&width, &height); + video_driver_set_size(width, height); #endif video_driver_get_size(&d3dpp->BackBufferWidth, &d3dpp->BackBufferHeight); @@ -1077,7 +1077,7 @@ static bool d3d9_alive(void *data) if ( temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return ret; } @@ -1192,7 +1192,7 @@ static bool d3d9_init_internal(d3d9_video_t *d3d, { unsigned new_width = info->fullscreen ? full_x : info->width; unsigned new_height = info->fullscreen ? full_y : info->height; - video_driver_set_size(&new_width, &new_height); + video_driver_set_size(new_width, new_height); } #ifdef HAVE_WINDOW diff --git a/gfx/drivers/fpga_gfx.c b/gfx/drivers/fpga_gfx.c index ec1b22a6b4..078cdae675 100644 --- a/gfx/drivers/fpga_gfx.c +++ b/gfx/drivers/fpga_gfx.c @@ -198,7 +198,7 @@ static void *fpga_gfx_init(const video_info_t *video, /* Get real known video size, which might have been altered by context. */ if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); video_driver_get_size(&temp_width, &temp_height); @@ -365,7 +365,7 @@ static bool fpga_gfx_alive(void *data) video_context_driver_check_window(&size_data); if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return true; } diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 7ac2e3d963..0b8dd02fb9 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -162,7 +162,7 @@ static void *gdi_gfx_init(const video_info_t *video, /* Get real known video size, which might have been altered by context. */ if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); video_driver_get_size(&temp_width, &temp_height); @@ -393,7 +393,7 @@ static bool gdi_gfx_alive(void *data) ret = !quit; if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return ret; } diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index d2dfa0e85a..08b5b66e78 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -3789,7 +3789,7 @@ static void *gl2_init(const video_info_t *video, /* Get real known video size, which might have been altered by context. */ if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); video_driver_get_size(&temp_width, &temp_height); gl->video_width = temp_width; @@ -3980,7 +3980,7 @@ static bool gl2_alive(void *data) if (temp_width != 0 && temp_height != 0) { - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); gl->video_width = temp_width; gl->video_height = temp_height; } diff --git a/gfx/drivers/gl1.c b/gfx/drivers/gl1.c index 90c6750ca2..1a8468f655 100644 --- a/gfx/drivers/gl1.c +++ b/gfx/drivers/gl1.c @@ -347,7 +347,7 @@ static void *gl1_gfx_init(const video_info_t *video, /* Get real known video size, which might have been altered by context. */ if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); video_driver_get_size(&temp_width, &temp_height); @@ -972,7 +972,7 @@ static bool gl1_gfx_alive(void *data) ret = !quit; if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return ret; } diff --git a/gfx/drivers/gl_core.c b/gfx/drivers/gl_core.c index 0579f396e4..2c44d8b12d 100644 --- a/gfx/drivers/gl_core.c +++ b/gfx/drivers/gl_core.c @@ -1299,7 +1299,7 @@ static void *gl_core_init(const video_info_t *video, /* Get real known video size, which might have been altered by context. */ if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); video_driver_get_size(&temp_width, &temp_height); gl->video_width = temp_width; gl->video_height = temp_height; @@ -1565,7 +1565,7 @@ static bool gl_core_alive(void *data) if (temp_width != 0 && temp_height != 0) { - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); gl->video_width = temp_width; gl->video_height = temp_height; } diff --git a/gfx/drivers/gx2_gfx.c b/gfx/drivers/gx2_gfx.c index 0032535ae0..2c00a23541 100644 --- a/gfx/drivers/gx2_gfx.c +++ b/gfx/drivers/gx2_gfx.c @@ -442,7 +442,7 @@ static void *wiiu_gfx_init(const video_info_t *video, wiiu->vp.height = wiiu->render_mode.height; wiiu->vp.full_width = wiiu->render_mode.width; wiiu->vp.full_height = wiiu->render_mode.height; - video_driver_set_size(&wiiu->vp.width, &wiiu->vp.height); + video_driver_set_size(wiiu->vp.width, wiiu->vp.height); driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, &refresh_rate); diff --git a/gfx/drivers/network_gfx.c b/gfx/drivers/network_gfx.c index 029a70fe95..a764914ebb 100644 --- a/gfx/drivers/network_gfx.c +++ b/gfx/drivers/network_gfx.c @@ -348,7 +348,7 @@ static bool network_gfx_alive(void *data) &quit, &resize, &temp_width, &temp_height, is_shutdown); if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return true; } diff --git a/gfx/drivers/sixel_gfx.c b/gfx/drivers/sixel_gfx.c index 00eca49828..01d0268dc9 100644 --- a/gfx/drivers/sixel_gfx.c +++ b/gfx/drivers/sixel_gfx.c @@ -450,7 +450,7 @@ static bool sixel_gfx_alive(void *data) &quit, &resize, &temp_width, &temp_height, is_shutdown); if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return true; } diff --git a/gfx/drivers/switch_gfx.c b/gfx/drivers/switch_gfx.c index c50065fae4..df765ed466 100644 --- a/gfx/drivers/switch_gfx.c +++ b/gfx/drivers/switch_gfx.c @@ -120,7 +120,7 @@ static void *switch_init(const video_info_t *video, sw->vp.height = 720; sw->vp.full_width = 1280; sw->vp.full_height = 720; - video_driver_set_size(&sw->vp.width, &sw->vp.height); + video_driver_set_size(sw->vp.width, sw->vp.height); sw->vsync = video->vsync; sw->rgb32 = video->rgb32; diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index aeab3b8ca2..2a5d76e86a 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -140,7 +140,7 @@ static void *vg_init(const video_info_t *video, RARCH_LOG("[VG]: Detecting screen resolution %ux%u.\n", temp_width, temp_height); if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); interval = video->vsync ? 1 : 0; @@ -193,7 +193,7 @@ static void *vg_init(const video_info_t *video, if (temp_width != 0 && temp_height != 0) { RARCH_LOG("[VG]: Verified window resolution %ux%u.\n", temp_width, temp_height); - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); } video_driver_get_size(&temp_width, &temp_height); @@ -463,7 +463,7 @@ static bool vg_alive(void *data) &quit, &resize, &temp_width, &temp_height, is_shutdown); if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); return !quit; } diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index 9001463423..98cdc3eeff 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -257,7 +257,7 @@ static void vga_gfx_set_nonblock_state(void *data, bool toggle) static bool vga_gfx_alive(void *data) { (void)data; - video_driver_set_size(&vga_video_width, &vga_video_height); + video_driver_set_size(vga_video_width, vga_video_height); return true; } diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index fca17d0909..df61bb9557 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -92,7 +92,7 @@ static void *vita2d_gfx_init(const video_info_t *video, vita->tex_filter = video->smooth ? SCE_GXM_TEXTURE_FILTER_LINEAR : SCE_GXM_TEXTURE_FILTER_POINT; - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); vita2d_gfx_set_viewport(vita, temp_width, temp_height, false, true); if (input && input_data) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index e4a648518e..a28b6178da 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1225,7 +1225,7 @@ static void *vulkan_init(const video_info_t *video, temp_height = mode.height; if (temp_width != 0 && temp_height != 0) - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); video_driver_get_size(&temp_width, &temp_height); vk->video_width = temp_width; vk->video_height = temp_height; @@ -1357,7 +1357,7 @@ static bool vulkan_alive(void *data) if (temp_width != 0 && temp_height != 0) { - video_driver_set_size(&temp_width, &temp_height); + video_driver_set_size(temp_width, temp_height); vk->video_width = temp_width; vk->video_height = temp_height; } diff --git a/retroarch.c b/retroarch.c index 745da7a3b1..4ee87195a3 100644 --- a/retroarch.c +++ b/retroarch.c @@ -20814,16 +20814,14 @@ void video_driver_get_size(unsigned *width, unsigned *height) #endif } -void video_driver_set_size(unsigned *width, unsigned *height) +void video_driver_set_size(unsigned width, unsigned height) { #ifdef HAVE_THREADS bool is_threaded = video_driver_is_threaded_internal(); video_driver_threaded_lock(is_threaded); #endif - if (width) - video_driver_width = *width; - if (height) - video_driver_height = *height; + video_driver_width = width; + video_driver_height = height; #ifdef HAVE_THREADS video_driver_threaded_unlock(is_threaded); #endif diff --git a/retroarch.h b/retroarch.h index 997da6d8de..e585cd5530 100644 --- a/retroarch.h +++ b/retroarch.h @@ -1632,7 +1632,7 @@ bool video_driver_set_viewport(unsigned width, unsigned height, void video_driver_get_size(unsigned *width, unsigned *height); -void video_driver_set_size(unsigned *width, unsigned *height); +void video_driver_set_size(unsigned width, unsigned height); float video_driver_get_aspect_ratio(void);