Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Patch made with
- # diff -rupN libretro-super/retroarch/gfx/video_driver.c libretro-super/retroarch/gfx/video_driver.c.patched > video_driver.c.patch
- # Applied with
- # patch -p0 < video_driver.c.patch
- --- libretro-super/retroarch/gfx/video_driver.c 2018-05-05 20:43:53.509478622 UTC
- +++ libretro-super/retroarch/gfx/video_driver.c.patched 2018-05-05 20:52:45.179189000 UTC
- @@ -1625,7 +1625,7 @@ bool video_driver_is_stub_frame(void)
- bool video_driver_supports_recording(void)
- {
- settings_t *settings = config_get_ptr();
- - return settings->bools.video_gpu_record
- + return settings->bools.video_gpu_record
- && current_video->read_viewport;
- }
- @@ -1652,7 +1652,7 @@ void video_driver_set_viewport_config(vo
- {
- struct retro_game_geometry *geom = &video_driver_av_info.geometry;
- - if (geom->aspect_ratio > 0.0f &&
- + if (geom->aspect_ratio > 0.0f &&
- settings->bools.video_aspect_ratio_auto)
- aspectratio_lut[ASPECT_RATIO_CONFIG].value = geom->aspect_ratio;
- else
- @@ -1880,7 +1880,7 @@ void video_driver_update_viewport(struct
- }
- else if (device_aspect > desired_aspect)
- {
- - delta = (desired_aspect / device_aspect - 1.0f)
- + delta = (desired_aspect / device_aspect - 1.0f)
- / 2.0f + 0.5f;
- vp->x = (int)roundf(vp->full_width * (0.5f - delta));
- vp->width = (unsigned)roundf(2.0f * vp->full_width * delta);
- @@ -1891,7 +1891,7 @@ void video_driver_update_viewport(struct
- {
- vp->x = 0;
- vp->width = vp->full_width;
- - delta = (device_aspect / desired_aspect - 1.0f)
- + delta = (device_aspect / desired_aspect - 1.0f)
- / 2.0f + 0.5f;
- vp->y = (int)roundf(vp->full_height * (0.5f - delta));
- vp->height = (unsigned)roundf(2.0f * vp->full_height * delta);
- @@ -2306,7 +2306,7 @@ void video_viewport_get_scaled_integer(s
- unsigned base_width;
- /* Use system reported sizes as these define the
- * geometry for the "normal" case. */
- - unsigned base_height =
- + unsigned base_height =
- video_driver_av_info.geometry.base_height;
- if (base_height == 0)
- @@ -2612,8 +2612,8 @@ void video_driver_frame(const void *data
- /* Display the FPS, with a higher priority. */
- if (video_info.fps_show)
- - runloop_msg_queue_push(video_info.fps_text, 2, 1, true);
- -
- + runloop_msg_queue_push(video_info.fps_text, 1, 1, false);
- +
- /* trigger set resolution*/
- if (video_info.crt_switch_resolution)
- {
- @@ -2629,7 +2629,7 @@ void video_driver_frame(const void *data
- }
- else if (!video_info.crt_switch_resolution)
- video_driver_crt_switching_active = false;
- -
- +
- /* trigger set resolution*/
- }
- @@ -2723,8 +2723,8 @@ void video_driver_build_info(video_frame
- settings = config_get_ptr();
- custom_vp = &settings->video_viewport_custom;
- video_info->refresh_rate = settings->floats.video_refresh_rate;
- - video_info->crt_switch_resolution = settings->bools.crt_switch_resolution;
- - video_info->crt_switch_resolution_super = settings->uints.crt_switch_resolution_super;
- + video_info->crt_switch_resolution = settings->bools.crt_switch_resolution;
- + video_info->crt_switch_resolution_super = settings->uints.crt_switch_resolution_super;
- video_info->black_frame_insertion = settings->bools.video_black_frame_insertion;
- video_info->hard_sync = settings->bools.video_hard_sync;
- video_info->hard_sync_frames = settings->uints.video_hard_sync_frames;
- @@ -2855,13 +2855,13 @@ bool video_driver_translate_coord_viewpo
- return false;
- if (mouse_x >= 0 && mouse_x <= norm_full_vp_width)
- - scaled_screen_x = ((2 * mouse_x * 0x7fff)
- + scaled_screen_x = ((2 * mouse_x * 0x7fff)
- / norm_full_vp_width) - 0x7fff;
- else
- scaled_screen_x = -0x8000; /* OOB */
- if (mouse_y >= 0 && mouse_y <= norm_full_vp_height)
- - scaled_screen_y = ((2 * mouse_y * 0x7fff)
- + scaled_screen_y = ((2 * mouse_y * 0x7fff)
- / norm_full_vp_height) - 0x7fff;
- else
- scaled_screen_y = -0x8000; /* OOB */
- @@ -2870,13 +2870,13 @@ bool video_driver_translate_coord_viewpo
- mouse_y -= vp->y;
- if (mouse_x >= 0 && mouse_x <= norm_vp_width)
- - scaled_x = ((2 * mouse_x * 0x7fff)
- + scaled_x = ((2 * mouse_x * 0x7fff)
- / norm_vp_width) - 0x7fff;
- else
- scaled_x = -0x8000; /* OOB */
- if (mouse_y >= 0 && mouse_y <= norm_vp_height)
- - scaled_y = ((2 * mouse_y * 0x7fff)
- + scaled_y = ((2 * mouse_y * 0x7fff)
- / norm_vp_height) - 0x7fff;
- else
- scaled_y = -0x8000; /* OOB */
- @@ -2902,7 +2902,7 @@ void video_driver_get_status(uint64_t *f
- bool *is_focused)
- {
- *frame_count = video_driver_frame_count;
- - *is_alive = current_video ?
- + *is_alive = current_video ?
- current_video->alive(video_driver_data) : true;
- *is_focused = video_driver_cb_has_focus();
- }
- @@ -2984,7 +2984,7 @@ bool video_context_driver_find_next_driv
- *
- * Initialize graphics context driver.
- *
- - * Returns: graphics context driver if successfully initialized,
- + * Returns: graphics context driver if successfully initialized,
- * otherwise NULL.
- **/
- static const gfx_ctx_driver_t *video_context_driver_init(
- @@ -3220,7 +3220,7 @@ bool video_context_driver_get_refresh_ra
- return false;
- if (refresh_rate)
- - *refresh_rate =
- + *refresh_rate =
- current_video_context.get_refresh_rate(video_context_data);
- return true;
- @@ -3229,7 +3229,7 @@ bool video_context_driver_get_refresh_ra
- bool video_context_driver_input_driver(gfx_ctx_input_t *inp)
- {
- settings_t *settings = config_get_ptr();
- - const char *joypad_name = settings ?
- + const char *joypad_name = settings ?
- settings->arrays.input_joypad_driver : NULL;
- if (!current_video_context.input_driver)
Advertisement
Add Comment
Please, Sign In to add comment