Skip to content

Commit 37405dd

Browse files
authored
Merge branch 'libretro:master' into webos
2 parents bf67b03 + bb0551b commit 37405dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+950
-184
lines changed

config.def.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@
662662
#ifdef HAVE_OZONE
663663
/* Ozone colour theme: 1 == Basic Black */
664664
#define DEFAULT_OZONE_COLOR_THEME 1
665+
#define DEFAULT_OZONE_PADDING_FACTOR 1.0f
666+
#define DEFAULT_OZONE_HEADER_SEPARATOR 1
665667
#define DEFAULT_OZONE_COLLAPSE_SIDEBAR false
666668
#define DEFAULT_OZONE_SCROLL_CONTENT_METADATA false
667669
#define DEFAULT_OZONE_THUMBNAIL_SCALE_FACTOR 1.0f

configuration.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,6 +1693,9 @@ static struct config_path_setting *populate_settings_path(
16931693
#ifdef HAVE_XMB
16941694
SETTING_PATH("xmb_font", settings->paths.path_menu_xmb_font, false, NULL, true);
16951695
#endif
1696+
#ifdef HAVE_OZONE
1697+
SETTING_PATH("ozone_font", settings->paths.path_menu_ozone_font, false, NULL, true);
1698+
#endif
16961699
#endif /* HAVE_MENU */
16971700

16981701
#ifdef HAVE_OVERLAY
@@ -2301,6 +2304,7 @@ static struct config_float_setting *populate_settings_float(
23012304
#endif
23022305
#ifdef HAVE_OZONE
23032306
SETTING_FLOAT("ozone_thumbnail_scale_factor", &settings->floats.ozone_thumbnail_scale_factor, true, DEFAULT_OZONE_THUMBNAIL_SCALE_FACTOR, false);
2307+
SETTING_FLOAT("ozone_padding_factor", &settings->floats.ozone_padding_factor, true, DEFAULT_OZONE_PADDING_FACTOR, false);
23042308
#endif
23052309
#endif /* HAVE_MENU */
23062310

@@ -2447,6 +2451,7 @@ static struct config_uint_setting *populate_settings_uint(
24472451
#endif
24482452
#ifdef HAVE_OZONE
24492453
SETTING_UINT("ozone_menu_color_theme", &settings->uints.menu_ozone_color_theme, true, DEFAULT_OZONE_COLOR_THEME, false);
2454+
SETTING_UINT("ozone_header_separator", &settings->uints.menu_ozone_header_separator, true, DEFAULT_OZONE_HEADER_SEPARATOR, false);
24502455
#endif
24512456
#endif /* HAVE_MENU */
24522457

@@ -2915,6 +2920,9 @@ void config_set_defaults(void *data)
29152920
#ifdef HAVE_XMB
29162921
*settings->paths.path_menu_xmb_font = '\0';
29172922
#endif
2923+
#ifdef HAVE_OZONE
2924+
*settings->paths.path_menu_ozone_font = '\0';
2925+
#endif
29182926

29192927
configuration_set_string(settings,
29202928
settings->arrays.discord_app_id,
@@ -3520,6 +3528,7 @@ static config_file_t *open_default_config_file(void)
35203528
goto error;
35213529

35223530
path_set(RARCH_PATH_CONFIG, conf_path);
3531+
path_set(RARCH_PATH_CONFIG_DEFAULT, conf_path);
35233532

35243533
return conf;
35253534

@@ -4001,7 +4010,10 @@ static bool config_load_file(global_t *global,
40014010
DEFAULT_MIDI_OUTPUT);
40024011

40034012
/* History playlists must stay in default config path */
4004-
path_config = g_defaults.path_config;
4013+
if (!path_is_empty(RARCH_PATH_CONFIG_DEFAULT))
4014+
path_config = path_get(RARCH_PATH_CONFIG_DEFAULT);
4015+
else
4016+
path_config = path_get(RARCH_PATH_CONFIG);
40054017

40064018
if (string_is_empty(settings->paths.path_content_favorites))
40074019
strlcpy(settings->paths.directory_content_favorites, "default",
@@ -5348,6 +5360,9 @@ bool config_save_file(const char *path)
53485360
config_set_path(conf, "xmb_font",
53495361
!string_is_empty(settings->paths.path_menu_xmb_font)
53505362
? settings->paths.path_menu_xmb_font : "");
5363+
config_set_path(conf, "ozone_font",
5364+
!string_is_empty(settings->paths.path_menu_ozone_font)
5365+
? settings->paths.path_menu_ozone_font : "");
53515366
#endif
53525367

53535368
/* String settings */

configuration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ typedef struct settings
305305
unsigned menu_materialui_thumbnail_view_landscape;
306306
unsigned menu_materialui_landscape_layout_optimization;
307307
unsigned menu_ozone_color_theme;
308+
unsigned menu_ozone_header_separator;
308309
unsigned menu_font_color_red;
309310
unsigned menu_font_color_green;
310311
unsigned menu_font_color_blue;
@@ -417,6 +418,7 @@ typedef struct settings
417418
float menu_ticker_speed;
418419
float menu_rgui_particle_effect_speed;
419420
float menu_screensaver_animation_speed;
421+
float ozone_padding_factor;
420422
float ozone_thumbnail_scale_factor;
421423

422424
float cheevos_appearance_padding_h;
@@ -576,6 +578,7 @@ typedef struct settings
576578
char bundle_assets_src[PATH_MAX_LENGTH];
577579
char bundle_assets_dst[PATH_MAX_LENGTH];
578580
char path_menu_xmb_font[PATH_MAX_LENGTH];
581+
char path_menu_ozone_font[PATH_MAX_LENGTH];
579582
char path_cheat_database[PATH_MAX_LENGTH];
580583
char path_content_database[PATH_MAX_LENGTH];
581584
char path_overlay[PATH_MAX_LENGTH];

frontend/drivers/platform_win32.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ static size_t frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
291291
char str_ProductName[64] = {0};
292292
char str_DisplayVersion[64] = {0};
293293
char str_LCUVer[64] = {0};
294-
char str_CurrentBuild[64] = {0};
295294
DWORD key_type = 0; /* null pointer */
296295
DWORD data_size = 0;
297296
long reg_read_result;
@@ -917,6 +916,7 @@ static bool frontend_win32_set_fork(enum frontend_fork fork_mode)
917916
#endif
918917

919918
#if defined(_WIN32) && !defined(_XBOX)
919+
#if 0
920920
static const char *accessibility_win_language_id(const char* language)
921921
{
922922
if (string_is_equal(language,"en"))
@@ -981,6 +981,7 @@ static const char *accessibility_win_language_id(const char* language)
981981
return "405";
982982
return "";
983983
}
984+
#endif
984985

985986
static const char *accessibility_win_language_code(const char* language)
986987
{
@@ -1164,10 +1165,10 @@ static bool accessibility_speak_windows(int speed,
11641165
char cmd[512];
11651166
const char *voice = get_user_language_iso639_1(true);
11661167
const char *language = accessibility_win_language_code(voice);
1168+
#if 0
11671169
const char *langid = accessibility_win_language_id(voice);
1168-
bool res = false;
1169-
const char* speeds[10] = {"-10", "-7.5", "-5", "-2.5", "0", "2", "4", "6", "8", "10"};
1170-
size_t nbytes_cmd = 0;
1170+
#endif
1171+
const char *speeds[10] = {"-10", "-7.5", "-5", "-2.5", "0", "2", "4", "6", "8", "10"};
11711172
if (speed < 1)
11721173
speed = 1;
11731174
else if (speed > 10)
@@ -1184,8 +1185,8 @@ static bool accessibility_speak_windows(int speed,
11841185

11851186
if (g_plat_win32_flags & PLAT_WIN32_FLAG_USE_POWERSHELL)
11861187
{
1187-
const char * template_lang = "powershell.exe -NoProfile -WindowStyle Hidden -Command \"Add-Type -AssemblyName System.Speech; $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; $synth.SelectVoice(\\\"%s\\\"); $synth.Rate = %s; $synth.Speak($input);\"";
1188-
const char * template_nolang = "powershell.exe -NoProfile -WindowStyle Hidden -Command \"Add-Type -AssemblyName System.Speech; $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; $synth.Rate = %s; $synth.Speak($input);\"";
1188+
const char *template_lang = "powershell.exe -NoProfile -WindowStyle Hidden -Command \"Add-Type -AssemblyName System.Speech; $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; $synth.SelectVoice(\\\"%s\\\"); $synth.Rate = %s; $synth.Speak($input);\"";
1189+
const char *template_nolang = "powershell.exe -NoProfile -WindowStyle Hidden -Command \"Add-Type -AssemblyName System.Speech; $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; $synth.Rate = %s; $synth.Speak($input);\"";
11891190
if (language && language[0] != '\0')
11901191
snprintf(cmd, sizeof(cmd), template_lang, language, speeds[speed-1]);
11911192
else

gfx/common/d3d9_common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,6 @@ void d3d9_calculate_rect(d3d9_video_t *d3d,
13401340
bool force_full,
13411341
bool allow_rotate)
13421342
{
1343-
float device_aspect = (float)*width / *height;
13441343
settings_t *settings = config_get_ptr();
13451344
bool video_scale_integer = settings->bools.video_scale_integer;
13461345
struct video_viewport vp;
@@ -1376,7 +1375,6 @@ void d3d9_calculate_rect(d3d9_video_t *d3d,
13761375
void d3d9_set_rotation(void *data, unsigned rot)
13771376
{
13781377
d3d9_video_t *d3d = (d3d9_video_t*)data;
1379-
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
13801378

13811379
if (!d3d)
13821380
return;
@@ -1466,7 +1464,6 @@ static bool d3d9_overlay_load(void *data,
14661464
const void *image_data, unsigned num_images)
14671465
{
14681466
unsigned i, y;
1469-
overlay_t *new_overlays = NULL;
14701467
d3d9_video_t *d3d = (d3d9_video_t*)data;
14711468
const struct texture_image *images = (const struct texture_image*)
14721469
image_data;

gfx/common/win32_common.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
723723
char win32_file[PATH_MAX_LENGTH] = {0};
724724
settings_t *settings = config_get_ptr();
725725
char *title_cp = NULL;
726-
size_t converted = 0;
727726
const char *extensions = "Libretro core (.dll)\0*.dll\0All Files\0*.*\0\0";
728727
const char *title = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_LIST);
729728
const char *initial_dir = settings->paths.directory_libretro;
@@ -762,7 +761,6 @@ static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
762761
char win32_file[PATH_MAX_LENGTH] = {0};
763762
char *title_cp = NULL;
764763
wchar_t *title_wide = NULL;
765-
size_t converted = 0;
766764
const char *extensions = "All Files (*.*)\0*.*\0\0";
767765
const char *title = msg_hash_to_str(
768766
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST);
@@ -1088,10 +1086,7 @@ static LRESULT CALLBACK wnd_proc_common(
10881086
}
10891087
break;
10901088
case WM_COMMAND:
1091-
{
1092-
settings_t *settings = config_get_ptr();
1093-
win32_menu_loop(main_window.hwnd, wparam);
1094-
}
1089+
win32_menu_loop(main_window.hwnd, wparam);
10951090
break;
10961091
}
10971092
return 0;

gfx/display_servers/dispserv_win32.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ static bool win32_display_server_set_window_opacity(
152152
{
153153
#ifdef HAVE_WINDOW_TRANSP
154154
HWND hwnd = win32_get_window();
155-
dispserv_win32_t *serv = (dispserv_win32_t*)data;
156155
/* Set window transparency on Windows 2000 and above */
157156
if (opacity < 100)
158157
{

gfx/drivers/d3d9hlsl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ static void gfx_display_d3d9_hlsl_draw_pipeline(
294294
gfx_display_t *p_disp,
295295
void *data, unsigned video_width, unsigned video_height)
296296
{
297-
static float t = 0;
298297
video_coord_array_t *ca = NULL;
299298

300299
if (!draw)

gfx/drivers/gdi_gfx.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,6 @@ static void *gdi_init(const video_info_t *video,
489489
input_driver_t **input, void **input_data)
490490
{
491491
unsigned full_x, full_y;
492-
void *ctx_data = NULL;
493492
unsigned mode_width = 0, mode_height = 0;
494493
unsigned win_width = 0, win_height = 0;
495494
unsigned temp_width = 0, temp_height = 0;
@@ -901,7 +900,6 @@ static void gdi_set_video_mode(void *data, unsigned width, unsigned height,
901900
static uintptr_t gdi_load_texture(void *video_data, void *data,
902901
bool threaded, enum texture_filter_type filter_type)
903902
{
904-
void *tmpdata = NULL;
905903
gdi_texture_t *texture = NULL;
906904
struct texture_image *image = (struct texture_image*)data;
907905

gfx/drivers/gl1.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,9 +1211,6 @@ static void gl1_set_viewport(gl1_t *gl1,
12111211
bool force_full, bool allow_rotate)
12121212
{
12131213
settings_t *settings = config_get_ptr();
1214-
unsigned height = gl1->video_height;
1215-
int x = 0;
1216-
int y = 0;
12171214
float device_aspect = (float)vp_width / vp_height;
12181215

12191216
if (gl1->ctx_driver->translate_aspect)
@@ -2125,7 +2122,6 @@ static uintptr_t gl1_load_texture(void *video_data, void *data,
21252122
#ifdef HAVE_THREADS
21262123
if (threaded)
21272124
{
2128-
gl1_t *gl1 = (gl1_t*)video_data;
21292125
custom_command_method_t func = video_texture_load_wrap_gl1;
21302126

21312127
return video_thread_texture_handle(data, func);

0 commit comments

Comments
 (0)