From 64446ef497bbba32b4a82059f5b733135feb92c8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 14 Feb 2015 05:52:05 +0100 Subject: [PATCH] Rename and move rarch_viewport --- general.h | 13 ++----------- gfx/d3d/d3d.cpp | 12 +++++++----- gfx/drivers/exynos_gfx.c | 2 +- gfx/drivers/gl.c | 7 +++---- gfx/drivers/gx_gfx.c | 2 +- gfx/drivers/gx_gfx.h | 4 +++- gfx/drivers/nullgfx.c | 3 ++- gfx/drivers/omap_gfx.c | 2 +- gfx/drivers/psp1_gfx.c | 17 ++++++++++------- gfx/drivers/sdl2_gfx.c | 17 ++++++++++------- gfx/drivers/sdl_gfx.c | 2 +- gfx/drivers/vg.c | 3 ++- gfx/drivers/xenon360_gfx.c | 4 +++- gfx/drivers/xvideo.c | 6 +++--- gfx/gl_common.h | 2 +- gfx/video_driver.c | 5 ++--- gfx/video_driver.h | 5 ++--- gfx/video_thread_wrapper.c | 7 ++++--- gfx/video_thread_wrapper.h | 4 ++-- gfx/video_viewport.c | 16 +++++++++------- gfx/video_viewport.h | 11 ++++++++++- input/drivers/x11_input.c | 4 +++- input/input_common.c | 4 +++- menu/menu_entries_cbs.c | 13 ++++++------- record/record_driver.c | 5 +++-- retroarch.h | 1 + screenshot.c | 3 ++- settings.c | 2 ++ 28 files changed, 99 insertions(+), 77 deletions(-) diff --git a/general.h b/general.h index 8ccc5937c7..a0a360f0d3 100644 --- a/general.h +++ b/general.h @@ -31,6 +31,7 @@ #include "core_options.h" #include "core_info.h" #include +#include "gfx/video_viewport.h" #include "playlist.h" @@ -83,16 +84,6 @@ enum sound_mode_enums SOUND_MODE_LAST }; -typedef struct rarch_viewport -{ - int x; - int y; - unsigned width; - unsigned height; - unsigned full_width; - unsigned full_height; -} rarch_viewport_t; - struct defaults { char menu_config_dir[PATH_MAX_LENGTH]; @@ -705,7 +696,7 @@ struct global struct { - rarch_viewport_t custom_vp; + video_viewport_t custom_vp; } viewports; unsigned gamma_correction; diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index 3ed18f9863..9f3622ebb4 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -349,7 +349,7 @@ static void d3d_calculate_rect(d3d_video_t *d3d, { if (g_settings.video.scale_integer) { - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; video_viewport_get_scaled_integer(&vp, width, height, desired_aspect, keep); d3d_set_viewport(d3d, vp.x, vp.y, vp.width, vp.height); } @@ -359,10 +359,12 @@ static void d3d_calculate_rect(d3d_video_t *d3d, { if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) { - const rarch_viewport_t &custom = + const video_viewport_t &custom = g_extern.console.screen.viewports.custom_vp; - d3d_set_viewport(d3d, custom.x, custom.y, - custom.width, custom.height); + + if (custom) + d3d_set_viewport(d3d, custom.x, custom.y, + custom.width, custom.height); } else { @@ -639,7 +641,7 @@ static bool d3d_construct(d3d_video_t *d3d, return true; } -static void d3d_viewport_info(void *data, struct rarch_viewport *vp) +static void d3d_viewport_info(void *data, struct video_viewport *vp) { d3d_video_t *d3d = (d3d_video_t*)data; diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 3eab922646..59d832f453 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -1505,7 +1505,7 @@ static void exynos_gfx_set_rotation(void *data, unsigned rotation) vid->menu_rotation = rotation; } -static void exynos_gfx_viewport_info(void *data, struct rarch_viewport *vp) +static void exynos_gfx_viewport_info(void *data, struct video_viewport *vp) { struct exynos_video *vid = (struct exynos_video*)data; diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 2796957536..79ba27fa3b 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -784,9 +784,7 @@ void gl_set_viewport(gl_t *gl, unsigned width, #if defined(HAVE_MENU) if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) { - const struct rarch_viewport *custom = - (const struct rarch_viewport*) - &g_extern.console.screen.viewports.custom_vp; + const struct video_viewport *custom = &g_extern.console.screen.viewports.custom_vp; /* GL has bottom-left origin viewport. */ x = custom->x; @@ -2624,10 +2622,11 @@ static bool gl_set_shader(void *data, #endif } -static void gl_viewport_info(void *data, struct rarch_viewport *vp) +static void gl_viewport_info(void *data, struct video_viewport *vp) { unsigned top_y, top_dist; gl_t *gl = (gl_t*)data; + *vp = gl->vp; vp->full_width = gl->win_width; vp->full_height = gl->win_height; diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index 8006e69dc9..98cec57efb 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1135,7 +1135,7 @@ static void gx_apply_state_changes(void *data) gx->should_resize = true; } -static void gx_viewport_info(void *data, struct rarch_viewport *vp) +static void gx_viewport_info(void *data, struct video_viewport *vp) { gx_video_t *gx = (gx_video_t*)data; *vp = gx->vp; diff --git a/gfx/drivers/gx_gfx.h b/gfx/drivers/gx_gfx.h index 1604b79995..3a75bee8ce 100644 --- a/gfx/drivers/gx_gfx.h +++ b/gfx/drivers/gx_gfx.h @@ -18,6 +18,8 @@ #ifndef _GX_VIDEO_H__ #define _GX_VIDEO_H__ +#include "../video_viewport.h" + struct gx_overlay_data { GXTexObj tex; @@ -34,7 +36,7 @@ typedef struct gx_video bool rgb32; uint32_t *menu_data; /* FIXME: Should be const uint16_t*. */ bool menu_texture_enable; - rarch_viewport_t vp; + video_viewport_t vp; unsigned scale; #ifdef HAVE_OVERLAY struct gx_overlay_data *overlay; diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c index 27fd8d7005..91b5493e24 100644 --- a/gfx/drivers/nullgfx.c +++ b/gfx/drivers/nullgfx.c @@ -16,6 +16,7 @@ #include "../../general.h" #include "../../driver.h" +#include "../video_viewport.h" static void *null_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) @@ -94,7 +95,7 @@ static void null_gfx_set_rotation(void *data, } static void null_gfx_viewport_info(void *data, - struct rarch_viewport *vp) + struct video_viewport *vp) { (void)data; (void)vp; diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index 84e3855de2..966780cf83 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -999,7 +999,7 @@ static bool omap_gfx_focus(void *data) return true; /* fb device always has focus */ } -static void omap_gfx_viewport_info(void *data, struct rarch_viewport *vp) +static void omap_gfx_viewport_info(void *data, struct video_viewport *vp) { omap_video_t *vid = (omap_video_t*)data; diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 66d70eb1f4..a8c6e8b292 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -102,7 +102,7 @@ typedef struct psp1_video psp1_menu_frame_t menu; - rarch_viewport_t vp; + video_viewport_t vp; unsigned rotation; bool vblank_not_reached; @@ -715,13 +715,16 @@ static void psp_update_viewport(psp1_video_t* psp) #if defined(HAVE_MENU) if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) { - const struct rarch_viewport *custom = + const struct video_viewport *custom = &g_extern.console.screen.viewports.custom_vp; - x = custom->x; - y = custom->y; - width = custom->width; - height = custom->height; + if (custom) + { + x = custom->x; + y = custom->y; + width = custom->width; + height = custom->height; + } } else #endif @@ -828,7 +831,7 @@ static void psp_apply_state_changes(void *data) psp->should_resize = true; } -static void psp_viewport_info(void *data, struct rarch_viewport *vp) +static void psp_viewport_info(void *data, struct video_viewport *vp) { psp1_video_t *psp = (psp1_video_t*)data; diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index bb2d83b1fc..85c89a8110 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -69,7 +69,7 @@ typedef struct _sdl2_video uint8_t font_g; uint8_t font_b; - struct rarch_viewport vp; + struct video_viewport vp; video_info_t video; @@ -274,12 +274,15 @@ static void sdl_refresh_viewport(sdl2_video_t *vid) vid->video.force_aspect); else if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) { - const struct rarch_viewport *custom = &g_extern.console.screen.viewports.custom_vp; + const struct video_viewport *custom = &g_extern.console.screen.viewports.custom_vp; - vid->vp.x = custom->x; - vid->vp.y = custom->y; - vid->vp.width = custom->width; - vid->vp.height = custom->height; + if (custom) + { + vid->vp.x = custom->x; + vid->vp.y = custom->y; + vid->vp.width = custom->width; + vid->vp.height = custom->height; + } } else if (vid->video.force_aspect) { @@ -592,7 +595,7 @@ static void sdl2_gfx_set_rotation(void *data, unsigned rotation) vid->rotation = 270 * rotation; } -static void sdl2_gfx_viewport_info(void *data, struct rarch_viewport *vp) +static void sdl2_gfx_viewport_info(void *data, struct video_viewport *vp) { sdl2_video_t *vid = (sdl2_video_t*)data; *vp = vid->vp; diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 7c63d38a60..2a01f82d50 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -424,7 +424,7 @@ static bool sdl_gfx_has_windowed(void *data) return true; } -static void sdl_gfx_viewport_info(void *data, struct rarch_viewport *vp) +static void sdl_gfx_viewport_info(void *data, struct video_viewport *vp) { sdl_video_t *vid = (sdl_video_t*)data; vp->x = vp->y = 0; diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index e1be8d53c8..e19ba868d7 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -28,6 +28,7 @@ #include "../../performance.h" #include "../font_renderer_driver.h" #include "../../content.h" +#include "../gfx/video_viewport.h" typedef struct { @@ -453,7 +454,7 @@ static void vg_set_rotation(void *data, unsigned rotation) } static void vg_viewport_info(void *data, - struct rarch_viewport *vp) + struct video_viewport *vp) { (void)data; (void)vp; diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index 97f6dc4051..4e0ca09976 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -25,6 +25,8 @@ #include "../../driver.h" #include "../../general.h" +#Include "../video_viewport.h" + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -292,7 +294,7 @@ static void xenon360_gfx_set_rotation(void *data, unsigned rotation) (void)rotation; } -static void xenon360_gfx_viewport_info(void *data, struct rarch_viewport *vp) +static void xenon360_gfx_viewport_info(void *data, struct video_viewport *vp) { (void)data; (void)vp; diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 203eed0d2f..3b26a56e1a 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -59,7 +59,7 @@ typedef struct xv unsigned width; unsigned height; bool keep_aspect; - struct rarch_viewport vp; + struct video_viewport vp; uint8_t *ytable; uint8_t *utable; @@ -350,7 +350,7 @@ static bool adaptor_set_format(xv_t *xv, Display *dpy, return false; } -static void calc_out_rect(bool keep_aspect, struct rarch_viewport *vp, +static void calc_out_rect(bool keep_aspect, struct video_viewport *vp, unsigned vp_width, unsigned vp_height) { vp->full_width = vp_width; @@ -878,7 +878,7 @@ static void xv_free(void *data) free(xv); } -static void xv_viewport_info(void *data, struct rarch_viewport *vp) +static void xv_viewport_info(void *data, struct video_viewport *vp) { xv_t *xv = (xv_t*)data; *vp = xv->vp; diff --git a/gfx/gl_common.h b/gfx/gl_common.h index 221c291f7c..33a5b39451 100644 --- a/gfx/gl_common.h +++ b/gfx/gl_common.h @@ -305,7 +305,7 @@ typedef struct gl unsigned win_width; unsigned win_height; - struct rarch_viewport vp; + struct video_viewport vp; unsigned vp_out_width; unsigned vp_out_height; unsigned last_width[MAX_TEXTURES]; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 2e8b287a38..e3d3856756 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -19,7 +19,6 @@ #include "video_driver.h" #include "video_thread_wrapper.h" #include "video_pixel_converter.h" -#include "video_viewport.h" #include "video_monitor.h" #include "../general.h" #include "../retroarch.h" @@ -386,7 +385,7 @@ void uninit_video_input(void) void init_video(void) { unsigned max_dim, scale, width, height; - rarch_viewport_t *custom_vp; + video_viewport_t *custom_vp = NULL; const input_driver_t *tmp = NULL; const struct retro_game_geometry *geom = NULL; video_info_t video = {0}; @@ -409,7 +408,7 @@ void init_video(void) video_viewport_set_config(); /* Update CUSTOM viewport. */ - custom_vp = (rarch_viewport_t*)&g_extern.console.screen.viewports.custom_vp; + custom_vp = &g_extern.console.screen.viewports.custom_vp; if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) { float default_aspect = aspectratio_lut[ASPECT_RATIO_CORE].value; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index bde75854ce..fffcfb09be 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -24,6 +24,7 @@ #include #include "video_filter.h" #include "video_shader_parse.h" +#include "video_viewport.h" #include "../libretro.h" #include "../input/input_driver.h" @@ -33,8 +34,6 @@ extern "C" { #endif -struct rarch_viewport; - typedef struct video_info { unsigned width; @@ -159,7 +158,7 @@ typedef struct video_driver const char *ident; void (*set_rotation)(void *data, unsigned rotation); - void (*viewport_info)(void *data, struct rarch_viewport *vp); + void (*viewport_info)(void *data, struct video_viewport *vp); /* Reads out in BGR byte order (24bpp). */ bool (*read_viewport)(void *data, uint8_t *buffer); diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 6a49aefcf9..17fb2486f2 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -15,6 +15,7 @@ */ #include "video_thread_wrapper.h" +#include "video_viewport.h" #include "../performance.h" #include #include @@ -135,7 +136,7 @@ static void thread_loop(void *data) case CMD_READ_VIEWPORT: { - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; thr->driver->viewport_info(thr->driver_data, &vp); @@ -306,7 +307,7 @@ static void thread_loop(void *data) bool alive = false; bool focus = false; bool has_windowed = true; - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; slock_lock(thr->frame.lock); @@ -591,7 +592,7 @@ static void thread_set_rotation(void *data, unsigned rotation) * * This means this value might not be correct, so viewport * reads are not supported for now. */ -static void thread_viewport_info(void *data, struct rarch_viewport *vp) +static void thread_viewport_info(void *data, struct video_viewport *vp) { thread_video_t *thr = (thread_video_t*)data; diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 02cfd52eb7..e4014ad34a 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -168,8 +168,8 @@ typedef struct thread_video } cmd_data; - struct rarch_viewport vp; - struct rarch_viewport read_vp; /* Last viewport reported to caller. */ + struct video_viewport vp; + struct video_viewport read_vp; /* Last viewport reported to caller. */ struct { diff --git a/gfx/video_viewport.c b/gfx/video_viewport.c index bf62498309..4da6402c0c 100644 --- a/gfx/video_viewport.c +++ b/gfx/video_viewport.c @@ -153,18 +153,20 @@ void video_viewport_get_scaled_integer(void *data, float aspect_ratio, bool keep_aspect) { int padding_x = 0, padding_y = 0; - struct rarch_viewport *vp = (struct rarch_viewport*)data; + struct video_viewport *vp = (struct video_viewport*)data; if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) { - const struct rarch_viewport *custom = - (const struct rarch_viewport*) + const struct video_viewport *custom = &g_extern.console.screen.viewports.custom_vp; - padding_x = width - custom->width; - padding_y = height - custom->height; - width = custom->width; - height = custom->height; + if (custom) + { + padding_x = width - custom->width; + padding_y = height - custom->height; + width = custom->width; + height = custom->height; + } } else { diff --git a/gfx/video_viewport.h b/gfx/video_viewport.h index bd8e6bb7ba..db7fa6d8f6 100644 --- a/gfx/video_viewport.h +++ b/gfx/video_viewport.h @@ -20,12 +20,21 @@ #include #include #include -#include "../general.h" #ifdef __cplusplus extern "C" { #endif +typedef struct video_viewport +{ + int x; + int y; + unsigned width; + unsigned height; + unsigned full_width; + unsigned full_height; +} video_viewport_t; + enum aspect_ratio { ASPECT_RATIO_4_3 = 0, diff --git a/input/drivers/x11_input.c b/input/drivers/x11_input.c index 9476eea967..e911ea7b22 100644 --- a/input/drivers/x11_input.c +++ b/input/drivers/x11_input.c @@ -19,6 +19,8 @@ #include "../../driver.h" +#include "../../gfx/video_viewport.h" + #include #include "../../general.h" #include @@ -281,7 +283,7 @@ static void x_input_poll_mouse(x11_input_t *x11) /* Somewhat hacky, but seem to do the job. */ if (x11->grab_mouse && driver.video->focus(driver.video_data)) { - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; if (driver.video && driver.video->viewport_info) driver.video->viewport_info(driver.video_data, &vp); diff --git a/input/input_common.c b/input/input_common.c index 1d7fa0bb11..1402e171ab 100644 --- a/input/input_common.c +++ b/input/input_common.c @@ -25,6 +25,8 @@ #include "../config.h" #endif +#include "../gfx/video_viewport.h" + static const char *bind_user_prefix[MAX_USERS] = { "input_player1", "input_player2", @@ -130,7 +132,7 @@ bool input_translate_coord_viewport(int mouse_x, int mouse_y, int16_t *res_screen_y) { int scaled_screen_x, scaled_screen_y, scaled_x, scaled_y; - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; bool have_viewport_info = driver.video && driver.video->viewport_info; if (!have_viewport_info) diff --git a/menu/menu_entries_cbs.c b/menu/menu_entries_cbs.c index 3b47d8229f..18b3037903 100644 --- a/menu/menu_entries_cbs.c +++ b/menu/menu_entries_cbs.c @@ -43,6 +43,8 @@ #include "../input/input_autodetect.h" #include "../input/input_remapping.h" +#include "../gfx/video_viewport.h" + #ifdef GEKKO enum { @@ -1547,15 +1549,13 @@ static int action_ok_set_path(const char *path, static int action_ok_custom_viewport(const char *path, const char *label, unsigned type, size_t idx) { - rarch_viewport_t *custom = NULL; + /* Start with something sane. */ + video_viewport_t *custom = &g_extern.console.screen.viewports.custom_vp; menu_handle_t *menu = menu_driver_resolve(); if (!menu) return -1; - /* Start with something sane. */ - custom = (rarch_viewport_t*) - &g_extern.console.screen.viewports.custom_vp; menu_list_push_stack( menu->menu_list, @@ -4127,8 +4127,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action) struct retro_game_geometry *geom = NULL; const char *base_msg = NULL; unsigned type = 0; - rarch_viewport_t *custom = (rarch_viewport_t*) - &g_extern.console.screen.viewports.custom_vp; + video_viewport_t *custom = &g_extern.console.screen.viewports.custom_vp; menu_handle_t *menu = menu_driver_resolve(); if (!menu) return -1; @@ -4220,7 +4219,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action) case MENU_ACTION_START: if (!g_settings.video.scale_integer) { - rarch_viewport_t vp; + video_viewport_t vp; if (driver.video_data && driver.video && driver.video->viewport_info) diff --git a/record/record_driver.c b/record/record_driver.c index 23154c430d..52b285e142 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -22,6 +22,7 @@ #include "../general.h" #include "../retroarch.h" #include "../intl/intl.h" +#include "../gfx/video_viewport.h" #ifdef HAVE_CONFIG_H #include "../config.h" @@ -101,7 +102,7 @@ void recording_dump_frame(const void *data, unsigned width, if (g_extern.record_gpu_buffer) { - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; if (driver.video && driver.video->viewport_info) driver.video->viewport_info(driver.video_data, &vp); @@ -220,7 +221,7 @@ bool recording_init(void) if (g_settings.video.gpu_record && driver.video->read_viewport) { - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; if (driver.video && driver.video->viewport_info) driver.video->viewport_info(driver.video_data, &vp); diff --git a/retroarch.h b/retroarch.h index 0a7ab6e822..86753e69fd 100644 --- a/retroarch.h +++ b/retroarch.h @@ -18,6 +18,7 @@ #define __RETROARCH_H #include +#include "core_info.h" #ifdef __cplusplus extern "C" { diff --git a/screenshot.c b/screenshot.c index 13233aa011..857de921cb 100644 --- a/screenshot.c +++ b/screenshot.c @@ -28,6 +28,7 @@ #include "retroarch.h" #include "retroarch_logger.h" #include "screenshot.h" +#include "gfx/video_viewport.h" #ifdef HAVE_CONFIG_H #include "config.h" @@ -175,7 +176,7 @@ static bool take_screenshot_viewport(void) const char *screenshot_dir = NULL; uint8_t *buffer = NULL; bool retval = false; - struct rarch_viewport vp = {0}; + struct video_viewport vp = {0}; if (driver.video && driver.video->viewport_info) driver.video->viewport_info(driver.video_data, &vp); diff --git a/settings.c b/settings.c index 4ecf4b7af8..f163780193 100644 --- a/settings.c +++ b/settings.c @@ -23,7 +23,9 @@ #include "input/input_common.h" #include "input/input_keymaps.h" #include "input/input_remapping.h" +#include "gfx/video_viewport.h" #include "settings.h" +#include "general.h" #ifdef HAVE_CONFIG_H #include "config.h"