mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Fix '--disable-crtswitchres' configure option (#12500)
This commit is contained in:
parent
620302ddaa
commit
adfabcb742
@ -2274,7 +2274,7 @@ ifeq ($(HAVE_FFMPEG), 1)
|
||||
endif
|
||||
|
||||
# CRT mode switching
|
||||
ifeq ($(HAVE_SR2), 1)
|
||||
ifeq ($(HAVE_CRTSWITCHRES), 1)
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)/switchres
|
||||
OBJ += gfx/video_crt_switch.o \
|
||||
$(DEPS_DIR)/switchres/monitor.o \
|
||||
|
@ -971,7 +971,9 @@ MIDI
|
||||
/*============================================================
|
||||
DRIVERS
|
||||
============================================================ */
|
||||
/*#include "../gfx/video_crt_switch.c" */
|
||||
#ifdef HAVE_CRTSWITCHRES
|
||||
#include "../gfx/video_crt_switch.c"
|
||||
#endif
|
||||
#include "../gfx/gfx_animation.c"
|
||||
#include "../gfx/gfx_display.c"
|
||||
#include "../gfx/gfx_thumbnail_path.c"
|
||||
|
@ -195,5 +195,5 @@ HAVE_ODROIDGO2=no # ODROID-GO Advance rotation support (requires librga
|
||||
HAVE_LIBSHAKE=no # libShake haptic feedback support
|
||||
HAVE_CHECK=no # check support for unit tests
|
||||
HAVE_WIFI=no # wifi driver support
|
||||
HAVE_CRTSWITCHRES=auto # CRT mode switching support
|
||||
HAVE_CRTSWITCHRES=yes # CRT mode switching support
|
||||
C89_CRTSWITCHRES=no
|
||||
|
38
retroarch.c
38
retroarch.c
@ -226,8 +226,8 @@
|
||||
#include "gfx/video_thread_wrapper.h"
|
||||
#endif
|
||||
#include "gfx/video_display_server.h"
|
||||
#ifdef HAVE_SR2
|
||||
#include "gfx/video_crt_switch.h"
|
||||
#ifdef HAVE_CRTSWITCHRES
|
||||
#include "gfx/video_crt_switch.h"
|
||||
#endif
|
||||
#include "bluetooth/bluetooth_driver.h"
|
||||
#include "wifi/wifi_driver.h"
|
||||
@ -31602,7 +31602,6 @@ static void video_driver_frame(const void *data, unsigned width,
|
||||
#if defined(HAVE_GFX_WIDGETS)
|
||||
bool widgets_active = p_rarch->widgets_active;
|
||||
#endif
|
||||
static int native_width = 0;
|
||||
|
||||
status_text[0] = '\0';
|
||||
video_driver_msg[0] = '\0';
|
||||
@ -31968,28 +31967,30 @@ static void video_driver_frame(const void *data, unsigned width,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_CRTSWITCHRES)
|
||||
/* trigger set resolution*/
|
||||
if (video_info.crt_switch_resolution)
|
||||
{
|
||||
unsigned native_width = width;
|
||||
bool dynamic_super_width = false;
|
||||
|
||||
p_rarch->video_driver_crt_switching_active = true;
|
||||
native_width = width;
|
||||
|
||||
switch (video_info.crt_switch_resolution_super)
|
||||
{
|
||||
case 2560:
|
||||
case 3840:
|
||||
case 1920:
|
||||
width =
|
||||
video_info.crt_switch_resolution_super;
|
||||
p_rarch->video_driver_crt_dynamic_super_width = false;
|
||||
width = video_info.crt_switch_resolution_super;
|
||||
dynamic_super_width = false;
|
||||
break;
|
||||
case 1:
|
||||
p_rarch->video_driver_crt_dynamic_super_width = true;
|
||||
dynamic_super_width = true;
|
||||
break;
|
||||
default:
|
||||
p_rarch->video_driver_crt_dynamic_super_width = false;
|
||||
break;
|
||||
}
|
||||
#if defined(HAVE_SR2) && !defined(ANDROID)
|
||||
|
||||
crt_switch_res_core(
|
||||
&p_rarch->crt_switch_st,
|
||||
native_width, width,
|
||||
@ -31999,12 +32000,12 @@ static void video_driver_frame(const void *data, unsigned width,
|
||||
video_info.crt_switch_center_adjust,
|
||||
video_info.crt_switch_porch_adjust,
|
||||
video_info.monitor_index,
|
||||
p_rarch->video_driver_crt_dynamic_super_width,
|
||||
dynamic_super_width,
|
||||
video_info.crt_switch_resolution_super,
|
||||
video_info.crt_switch_hires_menu);
|
||||
#endif
|
||||
}
|
||||
else if (!video_info.crt_switch_resolution)
|
||||
#endif
|
||||
p_rarch->video_driver_crt_switching_active = false;
|
||||
}
|
||||
|
||||
@ -33517,15 +33518,18 @@ static void retroarch_deinit_drivers(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CRTSWITCHRES)
|
||||
/* Switchres deinit */
|
||||
if (p_rarch->video_driver_crt_switching_active) {
|
||||
/* RARCH_LOG("[CRT]: Getting video info\n");
|
||||
if (p_rarch->video_driver_crt_switching_active)
|
||||
{
|
||||
#if defined(DEBUG)
|
||||
RARCH_LOG("[CRT]: Getting video info\n");
|
||||
RARCH_LOG("[CRT]: About to destroy SR\n");
|
||||
*/
|
||||
#ifdef HAVE_SR2
|
||||
#endif
|
||||
crt_destroy_modes(&p_rarch->crt_switch_st);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Video */
|
||||
video_display_server_destroy();
|
||||
|
||||
|
@ -1719,9 +1719,9 @@ struct rarch_state
|
||||
double audio_source_ratio_original;
|
||||
double audio_source_ratio_current;
|
||||
struct retro_system_av_info video_driver_av_info; /* double alignment */
|
||||
#ifdef HAVE_SR2
|
||||
#ifdef HAVE_CRTSWITCHRES
|
||||
videocrt_switch_t crt_switch_st; /* double alignment */
|
||||
#endif
|
||||
#endif
|
||||
retro_time_t frame_limit_minimum_time;
|
||||
retro_time_t frame_limit_last_time;
|
||||
retro_time_t libretro_core_runtime_last;
|
||||
@ -2254,7 +2254,6 @@ struct rarch_state
|
||||
bool video_driver_state_out_rgb32;
|
||||
#endif
|
||||
bool video_driver_crt_switching_active;
|
||||
bool video_driver_crt_dynamic_super_width;
|
||||
bool video_driver_threaded;
|
||||
|
||||
bool video_started_fullscreen;
|
||||
|
Loading…
Reference in New Issue
Block a user