Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Switch
RetroArch
RetroArch
Commits
d04f3c01
Commit
d04f3c01
authored
Nov 24, 2018
by
twinaphex
Browse files
Add initial implementation for resolution switching for Win32
parent
0eb8acd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
menu/cbs/menu_cbs_ok.c
View file @
d04f3c01
...
...
@@ -60,6 +60,7 @@
#include "../../verbosity.h"
#include "../../lakka.h"
#include "../../wifi/wifi_driver.h"
#include "../../gfx/video_display_server.h"
#include <net/net_http.h>
...
...
@@ -4463,12 +4464,37 @@ static int action_ok_push_dropdown_item(const char *path,
static
int
action_ok_push_dropdown_item_resolution
(
const
char
*
path
,
const
char
*
label
,
unsigned
type
,
size_t
idx
,
size_t
entry_idx
)
{
RARCH_LOG
(
"dropdown:
\n
"
);
RARCH_LOG
(
"path: %s
\n
"
,
path
);
RARCH_LOG
(
"label: %s
\n
"
,
label
);
RARCH_LOG
(
"type: %d
\n
"
,
type
);
RARCH_LOG
(
"idx: %d
\n
"
,
idx
);
RARCH_LOG
(
"entry_idx: %d
\n
"
,
entry_idx
);
char
str
[
100
];
char
*
pch
=
NULL
;
unsigned
width
=
0
;
unsigned
height
=
0
;
unsigned
refreshrate
=
0
;
snprintf
(
str
,
sizeof
(
str
),
"%s"
,
path
);
pch
=
strtok
(
str
,
"x"
);
if
(
pch
)
width
=
strtoul
(
pch
,
NULL
,
0
);
pch
=
strtok
(
NULL
,
" "
);
if
(
pch
)
height
=
strtoul
(
pch
,
NULL
,
0
);
pch
=
strtok
(
NULL
,
"("
);
if
(
pch
)
refreshrate
=
strtoul
(
pch
,
NULL
,
0
);
if
(
video_display_server_set_resolution
(
width
,
height
,
refreshrate
,
(
float
)
refreshrate
,
0
))
{
settings_t
*
settings
=
config_get_ptr
();
video_monitor_set_refresh_rate
((
float
)
refreshrate
);
settings
->
uints
.
video_fullscreen_x
=
width
;
settings
->
uints
.
video_fullscreen_y
=
height
;
/* TODO/FIXME - menu drivers like XMB don't rescale
* automatically */
}
return
0
;
}
...
...
menu/menu_displaylist.c
View file @
d04f3c01
...
...
@@ -8333,7 +8333,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
for
(
i
=
0
;
i
<
size
;
i
++
)
{
char
val_d
[
256
],
str
[
256
];
snprintf
(
str
,
sizeof
(
str
),
"%dx%d (%dHz)"
,
list
[
i
].
width
,
list
[
i
].
height
,
list
[
i
].
refreshrate
);
snprintf
(
str
,
sizeof
(
str
),
"%dx%d (%d
Hz)"
,
list
[
i
].
width
,
list
[
i
].
height
,
list
[
i
].
refreshrate
);
snprintf
(
val_d
,
sizeof
(
val_d
),
"%d"
,
i
);
menu_entries_append_enum
(
info
->
list
,
str
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment