Skip to content

Commit d8a5fb7

Browse files
Merge branch 'master' into hdr_upgrade
2 parents 6f531a8 + bd15d7c commit d8a5fb7

Some content is hidden

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

85 files changed

+2205
-1686
lines changed

Makefile.webos

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,13 @@ clean:
325325

326326
sdl2: $(TARGET)
327327
ifeq ($(ADD_SDL2_LIB), 1)
328-
@echo "Downloading SDL2 prebuilt"
329-
mkdir -p SDL
330-
wget -qO - $(SDL2_PREBUILT_ARCHIVE) | tar -C SDL -zxvf -
328+
@if [ ! -f SDL/lib/libSDL2-2.0.so.0 ]; then \
329+
echo "Downloading SDL2 prebuilt"; \
330+
mkdir -p SDL; \
331+
wget -qO - $(SDL2_PREBUILT_ARCHIVE) | tar -C SDL -zxvf -; \
332+
else \
333+
echo "SDL2 prebuilt already exists, skipping download"; \
334+
fi
331335
endif
332336

333337
ipk: prebuild $(TARGET) sdl2

command.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,17 +2369,6 @@ bool command_event_disk_control_append_image(
23692369
autosave_deinit();
23702370
#endif
23712371

2372-
/* TODO/FIXME: Need to figure out what to do with subsystems case. */
2373-
if (path_is_empty(RARCH_PATH_SUBSYSTEM))
2374-
{
2375-
/* Update paths for our new image.
2376-
* If we actually use append_image, we assume that we
2377-
* started out in a single disk case, and that this way
2378-
* of doing it makes the most sense. */
2379-
path_set(RARCH_PATH_NAMES, path);
2380-
runloop_path_fill_names();
2381-
}
2382-
23832372
command_event(CMD_EVENT_AUTOSAVE_INIT, NULL);
23842373

23852374
return true;

config.def.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,4 +1915,8 @@
19151915

19161916
#ifdef HAVE_SMBCLIENT
19171917
#define DEFAULT_SMB_CLIENT_AUTH_MODE 1
1918+
#define DEFAULT_SMB_CLIENT_NUM_CONTEXTS 4
1919+
#define DEFAULT_SMB_CLIENT_MAX_CONTEXTS 20
1920+
#define DEFAULT_SMB_CLIENT_TIMEOUT 5
1921+
#define DEFAULT_SMB_CLIENT_MAX_TIMEOUT 20
19181922
#endif

configuration.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,6 +2686,12 @@ static struct config_uint_setting *populate_settings_uint(
26862686
SETTING_UINT("input_overlay_mouse_alt_two_touch_input", &settings->uints.input_overlay_mouse_alt_two_touch_input, true, DEFAULT_INPUT_OVERLAY_MOUSE_ALT_TWO_TOUCH_INPUT, false);
26872687
#endif
26882688

2689+
#ifdef HAVE_SMBCLIENT
2690+
SETTING_UINT("smb_client_auth_mode", &settings->uints.smb_client_auth_mode, true, DEFAULT_SMB_CLIENT_AUTH_MODE, false);
2691+
SETTING_UINT("smb_client_num_contexts", &settings->uints.smb_client_num_contexts, true, DEFAULT_SMB_CLIENT_NUM_CONTEXTS, false);
2692+
SETTING_UINT("smb_client_timeout", &settings->uints.smb_client_timeout, true, DEFAULT_SMB_CLIENT_TIMEOUT, false);
2693+
#endif
2694+
26892695
*size = count;
26902696

26912697
return tmp;
@@ -2764,10 +2770,6 @@ static struct config_int_setting *populate_settings_int(
27642770
#endif
27652771
SETTING_INT("input_turbo_bind", &settings->ints.input_turbo_bind, true, DEFAULT_TURBO_BIND, false);
27662772

2767-
#ifdef HAVE_SMBCLIENT
2768-
SETTING_INT("smb_client_auth_mode", &settings->ints.smb_client_auth_mode, true, DEFAULT_SMB_CLIENT_AUTH_MODE, false);
2769-
#endif
2770-
27712773
*size = count;
27722774

27732775
return tmp;

configuration.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,6 @@ typedef struct settings
155155
int input_overlay_lightgun_port;
156156
#endif
157157
int input_turbo_bind;
158-
#ifdef HAVE_SMBCLIENT
159-
int smb_client_auth_mode;
160-
#endif
161158
} ints;
162159

163160
struct
@@ -401,6 +398,12 @@ typedef struct settings
401398

402399
unsigned cheevos_appearance_anchor;
403400
unsigned cheevos_visibility_summary;
401+
402+
#ifdef HAVE_SMBCLIENT
403+
unsigned smb_client_auth_mode;
404+
unsigned smb_client_num_contexts;
405+
unsigned smb_client_timeout;
406+
#endif
404407
} uints;
405408

406409
struct

deps/rcheevos/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v12.2.1
2+
* fix parsing of leaderboards with comparisons in legacy-formatted values
3+
* fix validation warning on long AddSource chains
4+
15
# v12.2.0
26
* add rc_client_create_subset_list
37
* add rc_client_begin_fetch_game_titles

deps/rcheevos/src/rc_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RC_BEGIN_C_DECLS
99

1010
#define RCHEEVOS_VERSION_MAJOR 12
1111
#define RCHEEVOS_VERSION_MINOR 2
12-
#define RCHEEVOS_VERSION_PATCH 0
12+
#define RCHEEVOS_VERSION_PATCH 1
1313

1414
#define RCHEEVOS_MAKE_VERSION(major, minor, patch) (major * 1000000 + minor * 1000 + patch)
1515
#define RCHEEVOS_VERSION RCHEEVOS_MAKE_VERSION(RCHEEVOS_VERSION_MAJOR, RCHEEVOS_VERSION_MINOR, RCHEEVOS_VERSION_PATCH)

deps/rcheevos/src/rcheevos/value.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,11 @@ static void rc_parse_legacy_value(rc_value_t* self, const char** memaddr, rc_par
180180
return;
181181
}
182182

183-
if (!rc_operator_is_modifying(cond->oper)) {
184-
parse->offset = RC_INVALID_OPERATOR;
185-
return;
183+
if (cond->type == RC_CONDITION_MEASURED && !rc_operator_is_modifying(cond->oper)) {
184+
/* ignore non-modifying operator on measured clause. if it were parsed as an AddSource
185+
* or SubSource, that would have already happened in rc_parse_condition_internal, and
186+
* legacy formatted values are essentially a series of AddSources. */
187+
cond->oper = RC_OPERATOR_NONE;
186188
}
187189

188190
rc_condition_update_parse_state(cond, parse);

disk_control_interface.c

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -342,25 +342,19 @@ bool disk_control_set_eject_state(
342342
size_t _len;
343343

344344
if (!disk_control || !disk_control->cb.set_eject_state)
345-
return false;
345+
return err;
346346

347347
/* Set eject state */
348348
if (disk_control->cb.set_eject_state(eject))
349-
_len = strlcpy(
350-
msg,
351-
eject
352-
? msg_hash_to_str(MSG_DISK_EJECTED)
353-
: msg_hash_to_str(MSG_DISK_CLOSED),
354-
sizeof(msg));
349+
_len = strlcpy(msg,
350+
eject ? msg_hash_to_str(MSG_DISK_EJECTED) : msg_hash_to_str(MSG_DISK_CLOSED),
351+
sizeof(msg));
355352
else
356353
{
357354
err = true;
358-
_len = strlcpy(
359-
msg,
360-
eject
361-
? msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY_EJECT)
362-
: msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY_CLOSE),
363-
sizeof(msg));
355+
_len = strlcpy(msg,
356+
eject ? msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY_EJECT) : msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY_CLOSE),
357+
sizeof(msg));
364358
}
365359

366360
if (_len > 0)
@@ -398,9 +392,9 @@ bool disk_control_set_eject_state(
398392
/**
399393
* disk_control_set_index:
400394
*
401-
* Sets currently selected disk index
402-
*
403-
* NOTE: Will fail if disk is not currently ejected
395+
* Sets currently selected disk index.
396+
* Does silent eject and delayed insert with
397+
* 'runloop_st->pending_disk_control_insert' if tray is closed.
404398
**/
405399
bool disk_control_set_index(
406400
disk_control_interface_t *disk_control,
@@ -414,17 +408,26 @@ bool disk_control_set_index(
414408

415409
msg[0] = '\0';
416410

417-
if (!disk_control)
418-
return false;
411+
if ( !disk_control
412+
|| !disk_control->cb.get_eject_state
413+
|| !disk_control->cb.get_num_images
414+
|| !disk_control->cb.get_image_index
415+
|| !disk_control->cb.set_image_index)
416+
return err;
419417

420-
if ( !disk_control->cb.get_eject_state
421-
|| !disk_control->cb.get_num_images
422-
|| !disk_control->cb.set_image_index)
423-
return false;
418+
/* Do nothing if the desired disc is already in */
419+
if (disk_control->cb.get_image_index() == index)
420+
return !err;
424421

425-
/* Ensure that disk is currently ejected */
422+
/* Do delayed disk insert if changing while not ejected */
426423
if (!disk_control->cb.get_eject_state())
427-
return false;
424+
{
425+
runloop_state_t *runloop_st = runloop_state_get_ptr();
426+
427+
if ( runloop_st
428+
&& disk_control_set_eject_state(disk_control, true, false))
429+
runloop_st->pending_disk_control_insert = 100;
430+
}
428431

429432
/* Get current number of disk images */
430433
num_images = disk_control->cb.get_num_images();
@@ -466,7 +469,6 @@ bool disk_control_set_index(
466469
&& disk_control->cb.get_image_path)
467470
{
468471
char new_image_path[PATH_MAX_LENGTH] = {0};
469-
/* Get current image index + path */
470472
unsigned new_image_index = disk_control->cb.get_image_index();
471473
bool image_path_valid = disk_control->cb.get_image_path(
472474
new_image_index, new_image_path, sizeof(new_image_path));
@@ -618,22 +620,22 @@ bool disk_control_append_image(
618620

619621
if ((new_index = disk_control->cb.get_num_images()) < 1)
620622
goto error;
621-
new_index--;
622623

624+
new_index--;
623625
info.path = image_path;
624-
if (!disk_control->cb.replace_image_index(new_index, &info))
625-
goto error;
626626

627-
/* Set new index */
628-
if (!disk_control_set_index(disk_control, new_index, false))
627+
if (!disk_control->cb.replace_image_index(new_index, &info))
629628
goto error;
630629

631-
/* If tray was initially closed, insert disk
632-
* (i.e. leave system in the state we found it) */
630+
/* If tray was initially closed, insert disk */
633631
if ( !initial_disk_ejected
634632
&& !disk_control_set_eject_state(disk_control, false, false))
635633
goto error;
636634

635+
/* Set new index */
636+
if (!disk_control_set_index(disk_control, new_index, false))
637+
goto error;
638+
637639
/* Display log */
638640
_len = strlcpy(msg, msg_hash_to_str(MSG_APPENDED_DISK), sizeof(msg) - 3);
639641
msg[ _len] = ':';
@@ -658,11 +660,7 @@ bool disk_control_append_image(
658660
* NOTE: If this fails then it's game over -
659661
* just display the error notification and
660662
* hope for the best... */
661-
if (!disk_control->cb.get_eject_state())
662-
disk_control_set_eject_state(disk_control, true, false);
663663
disk_control_set_index(disk_control, initial_index, false);
664-
if (!initial_disk_ejected)
665-
disk_control_set_eject_state(disk_control, false, false);
666664

667665
_len = strlcpy(msg,
668666
msg_hash_to_str(MSG_FAILED_TO_APPEND_DISK), sizeof(msg) - 3);
@@ -672,7 +670,7 @@ bool disk_control_append_image(
672670
_len += strlcpy(msg + _len, image_filename, sizeof(msg) - _len);
673671

674672
runloop_msg_queue_push(msg, _len, 2, 180, true, NULL,
675-
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
673+
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
676674

677675
return false;
678676
}

gfx/drivers/d3d11.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ static void d3d11_set_hdr_paper_white_nits(void* data, float paper_white_nits)
16301630
{
16311631
for (unsigned i = 0; i < d3d11->shader_preset->passes; i++)
16321632
{
1633-
d3d11->pass[i].paper_white_nits = paper_white_nits;
1633+
d3d11->pass[i].paper_white_nits = paper_white_nits;
16341634
}
16351635
}
16361636
}
@@ -3611,7 +3611,7 @@ static bool d3d11_gfx_frame(
36113611
#ifdef HAVE_DXGI_HDR
36123612
settings_t* settings = config_get_ptr();
36133613

3614-
d3d11->pass[i].enable_hdr = (d3d11->flags & D3D11_ST_FLAG_HDR_ENABLE) ? 1.0f : 0.0f;
3614+
d3d11->pass[i].enable_hdr = (d3d11->flags & D3D11_ST_FLAG_HDR_ENABLE) ? 1.0f : 0.0f;
36153615

36163616
if(d3d11->flags & D3D11_ST_FLAG_HDR_ENABLE)
36173617
{

0 commit comments

Comments
 (0)