mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
Fix for Linux users exit error when CRT disabled
This commit is contained in:
parent
87a45160f0
commit
d1b834a301
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
static char old_mode[150];
|
static char old_mode[150];
|
||||||
static char new_mode[150];
|
static char new_mode[150];
|
||||||
|
static bool crt_en = false;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -47,7 +48,8 @@ static void x11_display_server_destroy(void *data)
|
|||||||
{
|
{
|
||||||
dispserv_x11_t *dispserv = (dispserv_x11_t*)data;
|
dispserv_x11_t *dispserv = (dispserv_x11_t*)data;
|
||||||
|
|
||||||
system("xrandr -s 704x480");
|
if (crt_en == true)
|
||||||
|
system("xrandr -s 704x480");
|
||||||
|
|
||||||
if (dispserv)
|
if (dispserv)
|
||||||
free(dispserv);
|
free(dispserv);
|
||||||
@ -99,6 +101,8 @@ static bool x11_set_resolution(void *data,
|
|||||||
char fbset[150];
|
char fbset[150];
|
||||||
char output[150];
|
char output[150];
|
||||||
|
|
||||||
|
crt_en = true;
|
||||||
|
|
||||||
hsp = width*1.12;
|
hsp = width*1.12;
|
||||||
|
|
||||||
/* set core refresh from hz */
|
/* set core refresh from hz */
|
||||||
@ -110,6 +114,7 @@ static bool x11_set_resolution(void *data,
|
|||||||
width = width*2;
|
width = width*2;
|
||||||
crt_aspect_ratio_switch(width, height);
|
crt_aspect_ratio_switch(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
hfp = width+16;
|
hfp = width+16;
|
||||||
hbp = width*1.22;
|
hbp = width*1.22;
|
||||||
hmax = hbp;
|
hmax = hbp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user