Guest User

Fix RGUI Onscreen Messages (Patch)

a guest
May 5th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.15 KB | None | 0 0
  1. # Patch made with
  2. # diff -rupN libretro-super/retroarch/gfx/video_driver.c libretro-super/retroarch/gfx/video_driver.c.patched > video_driver.c.patch
  3. # Applied with
  4. # patch -p0 < video_driver.c.patch
  5. --- libretro-super/retroarch/gfx/video_driver.c 2018-05-05 20:43:53.509478622 UTC
  6. +++ libretro-super/retroarch/gfx/video_driver.c.patched 2018-05-05 20:52:45.179189000 UTC
  7. @@ -1625,7 +1625,7 @@ bool video_driver_is_stub_frame(void)
  8. bool video_driver_supports_recording(void)
  9. {
  10. settings_t *settings = config_get_ptr();
  11. - return settings->bools.video_gpu_record
  12. + return settings->bools.video_gpu_record
  13. && current_video->read_viewport;
  14. }
  15.  
  16. @@ -1652,7 +1652,7 @@ void video_driver_set_viewport_config(vo
  17. {
  18. struct retro_game_geometry *geom = &video_driver_av_info.geometry;
  19.  
  20. - if (geom->aspect_ratio > 0.0f &&
  21. + if (geom->aspect_ratio > 0.0f &&
  22. settings->bools.video_aspect_ratio_auto)
  23. aspectratio_lut[ASPECT_RATIO_CONFIG].value = geom->aspect_ratio;
  24. else
  25. @@ -1880,7 +1880,7 @@ void video_driver_update_viewport(struct
  26. }
  27. else if (device_aspect > desired_aspect)
  28. {
  29. - delta = (desired_aspect / device_aspect - 1.0f)
  30. + delta = (desired_aspect / device_aspect - 1.0f)
  31. / 2.0f + 0.5f;
  32. vp->x = (int)roundf(vp->full_width * (0.5f - delta));
  33. vp->width = (unsigned)roundf(2.0f * vp->full_width * delta);
  34. @@ -1891,7 +1891,7 @@ void video_driver_update_viewport(struct
  35. {
  36. vp->x = 0;
  37. vp->width = vp->full_width;
  38. - delta = (device_aspect / desired_aspect - 1.0f)
  39. + delta = (device_aspect / desired_aspect - 1.0f)
  40. / 2.0f + 0.5f;
  41. vp->y = (int)roundf(vp->full_height * (0.5f - delta));
  42. vp->height = (unsigned)roundf(2.0f * vp->full_height * delta);
  43. @@ -2306,7 +2306,7 @@ void video_viewport_get_scaled_integer(s
  44. unsigned base_width;
  45. /* Use system reported sizes as these define the
  46. * geometry for the "normal" case. */
  47. - unsigned base_height =
  48. + unsigned base_height =
  49. video_driver_av_info.geometry.base_height;
  50.  
  51. if (base_height == 0)
  52. @@ -2612,8 +2612,8 @@ void video_driver_frame(const void *data
  53.  
  54. /* Display the FPS, with a higher priority. */
  55. if (video_info.fps_show)
  56. - runloop_msg_queue_push(video_info.fps_text, 2, 1, true);
  57. -
  58. + runloop_msg_queue_push(video_info.fps_text, 1, 1, false);
  59. +
  60. /* trigger set resolution*/
  61. if (video_info.crt_switch_resolution)
  62. {
  63. @@ -2629,7 +2629,7 @@ void video_driver_frame(const void *data
  64. }
  65. else if (!video_info.crt_switch_resolution)
  66. video_driver_crt_switching_active = false;
  67. -
  68. +
  69. /* trigger set resolution*/
  70. }
  71.  
  72. @@ -2723,8 +2723,8 @@ void video_driver_build_info(video_frame
  73. settings = config_get_ptr();
  74. custom_vp = &settings->video_viewport_custom;
  75. video_info->refresh_rate = settings->floats.video_refresh_rate;
  76. - video_info->crt_switch_resolution = settings->bools.crt_switch_resolution;
  77. - video_info->crt_switch_resolution_super = settings->uints.crt_switch_resolution_super;
  78. + video_info->crt_switch_resolution = settings->bools.crt_switch_resolution;
  79. + video_info->crt_switch_resolution_super = settings->uints.crt_switch_resolution_super;
  80. video_info->black_frame_insertion = settings->bools.video_black_frame_insertion;
  81. video_info->hard_sync = settings->bools.video_hard_sync;
  82. video_info->hard_sync_frames = settings->uints.video_hard_sync_frames;
  83. @@ -2855,13 +2855,13 @@ bool video_driver_translate_coord_viewpo
  84. return false;
  85.  
  86. if (mouse_x >= 0 && mouse_x <= norm_full_vp_width)
  87. - scaled_screen_x = ((2 * mouse_x * 0x7fff)
  88. + scaled_screen_x = ((2 * mouse_x * 0x7fff)
  89. / norm_full_vp_width) - 0x7fff;
  90. else
  91. scaled_screen_x = -0x8000; /* OOB */
  92.  
  93. if (mouse_y >= 0 && mouse_y <= norm_full_vp_height)
  94. - scaled_screen_y = ((2 * mouse_y * 0x7fff)
  95. + scaled_screen_y = ((2 * mouse_y * 0x7fff)
  96. / norm_full_vp_height) - 0x7fff;
  97. else
  98. scaled_screen_y = -0x8000; /* OOB */
  99. @@ -2870,13 +2870,13 @@ bool video_driver_translate_coord_viewpo
  100. mouse_y -= vp->y;
  101.  
  102. if (mouse_x >= 0 && mouse_x <= norm_vp_width)
  103. - scaled_x = ((2 * mouse_x * 0x7fff)
  104. + scaled_x = ((2 * mouse_x * 0x7fff)
  105. / norm_vp_width) - 0x7fff;
  106. else
  107. scaled_x = -0x8000; /* OOB */
  108.  
  109. if (mouse_y >= 0 && mouse_y <= norm_vp_height)
  110. - scaled_y = ((2 * mouse_y * 0x7fff)
  111. + scaled_y = ((2 * mouse_y * 0x7fff)
  112. / norm_vp_height) - 0x7fff;
  113. else
  114. scaled_y = -0x8000; /* OOB */
  115. @@ -2902,7 +2902,7 @@ void video_driver_get_status(uint64_t *f
  116. bool *is_focused)
  117. {
  118. *frame_count = video_driver_frame_count;
  119. - *is_alive = current_video ?
  120. + *is_alive = current_video ?
  121. current_video->alive(video_driver_data) : true;
  122. *is_focused = video_driver_cb_has_focus();
  123. }
  124. @@ -2984,7 +2984,7 @@ bool video_context_driver_find_next_driv
  125. *
  126. * Initialize graphics context driver.
  127. *
  128. - * Returns: graphics context driver if successfully initialized,
  129. + * Returns: graphics context driver if successfully initialized,
  130. * otherwise NULL.
  131. **/
  132. static const gfx_ctx_driver_t *video_context_driver_init(
  133. @@ -3220,7 +3220,7 @@ bool video_context_driver_get_refresh_ra
  134. return false;
  135.  
  136. if (refresh_rate)
  137. - *refresh_rate =
  138. + *refresh_rate =
  139. current_video_context.get_refresh_rate(video_context_data);
  140.  
  141. return true;
  142. @@ -3229,7 +3229,7 @@ bool video_context_driver_get_refresh_ra
  143. bool video_context_driver_input_driver(gfx_ctx_input_t *inp)
  144. {
  145. settings_t *settings = config_get_ptr();
  146. - const char *joypad_name = settings ?
  147. + const char *joypad_name = settings ?
  148. settings->arrays.input_joypad_driver : NULL;
  149.  
  150. if (!current_video_context.input_driver)
Advertisement
Add Comment
Please, Sign In to add comment