Skip to content

Commit caa1052

Browse files
committed
Fix code review comments
1 parent 05dea59 commit caa1052

8 files changed

Lines changed: 23 additions & 35 deletions

File tree

configuration.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,8 +1617,8 @@ static struct config_array_setting *populate_settings_array(
16171617
SETTING_ARRAY("cheevos_leaderboards_enable", settings->arrays.cheevos_leaderboards_enable, true, "", true); /* deprecated */
16181618
#endif
16191619

1620-
SETTING_ARRAY("netplay_mitm_server", settings->arrays.netplay_mitm_server, false, NULL, true);
16211620
#ifdef HAVE_NETWORKING
1621+
SETTING_ARRAY("netplay_mitm_server", settings->arrays.netplay_mitm_server, false, NULL, true);
16221622
#ifdef HAVE_CLOUDSYNC
16231623
SETTING_ARRAY("webdav_url", settings->arrays.webdav_url, false, NULL, true);
16241624
SETTING_ARRAY("webdav_username", settings->arrays.webdav_username, false, NULL, true);

libretro-common/net/net_http.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,11 +1012,6 @@ static bool net_http_connect(struct http_t *state)
10121012
struct conn_pool_entry *conn = state->conn;
10131013
struct dns_cache_entry *dns_entry = net_http_dns_cache_find(state->request.domain, state->request.port);
10141014
/* we just used/added this in _new_socket above, if it's not there it's a big bug */
1015-
if (!dns_entry || !dns_entry->addr || !conn)
1016-
{
1017-
net_http_log_transport_state(state, "connect_missing_dns_or_conn", -1);
1018-
return false;
1019-
}
10201015
addr = dns_entry->addr;
10211016

10221017
#ifndef HAVE_SSL
@@ -1025,6 +1020,11 @@ static bool net_http_connect(struct http_t *state)
10251020
#else
10261021
if (state->ssl)
10271022
{
1023+
if (!conn)
1024+
{
1025+
net_http_log_transport_state(state, "connect_missing_dns_or_conn", -1);
1026+
return false;
1027+
}
10281028
for (next_addr = addr; conn->fd >= 0; conn->fd = socket_next((void**)&next_addr))
10291029
{
10301030
if (!(conn->ssl_ctx = ssl_socket_init(conn->fd, state->request.domain)))

network/cloud_sync/google_drive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ static void gdrive_do_patch(gdrive_cb_state_t *cb_st)
13561356
cb_st->path, (long long)len);
13571357
task_push_http_transfer_with_content(url, "PATCH",
13581358
buf, (size_t)len, "application/octet-stream",
1359-
true, headers, gdrive_upload_cb, cb_st);
1359+
true, false, headers, gdrive_upload_cb, cb_st);
13601360
free(buf);
13611361
free(headers);
13621362
}

network/cloud_sync/s3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ static bool s3_http_put_async(const char *url, const char *headers,
929929
const void *data, size_t data_len, s3_cb_state_t *cb_state)
930930
{
931931
return task_push_http_transfer_with_content(url, "PUT",
932-
data, data_len, "application/octet-stream", true,
932+
data, data_len, "application/octet-stream", true, false,
933933
headers, s3_update_cb, cb_state) != NULL;
934934
}
935935

@@ -1399,7 +1399,7 @@ static void s3_multipart_complete(s3_multipart_state_t *mp_st)
13991399
goto fail;
14001400

14011401
if (!task_push_http_transfer_with_content(url_with_query, "POST",
1402-
xml_body, xml_len, "application/xml", true,
1402+
xml_body, xml_len, "application/xml", true, false,
14031403
auth_header, s3_multipart_complete_cb, mp_st))
14041404
goto fail;
14051405

@@ -1500,7 +1500,7 @@ static void s3_multipart_upload_next_part(s3_multipart_state_t *mp_st)
15001500
if (!url_with_query || !auth_header)
15011501
goto fail;
15021502

1503-
if (!task_push_http_transfer_with_content_ex(url_with_query, "PUT",
1503+
if (!task_push_http_transfer_with_content(url_with_query, "PUT",
15041504
mp_st->file_data + offset, content_len, "application/octet-stream", true, true,
15051505
auth_header, s3_multipart_upload_part_cb, mp_st))
15061506
goto fail;

pkg/apple/BaseConfig.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ OTHER_CFLAGS = $(inherited) -DHAVE_RPNG
7474
OTHER_CFLAGS = $(inherited) -DHAVE_RTGA
7575
OTHER_CFLAGS = $(inherited) -DHAVE_RUNAHEAD
7676
OTHER_CFLAGS = $(inherited) -DHAVE_RWAV
77+
OTHER_CFLAGS = $(inherited) -DHAVE_S3
7778
OTHER_CFLAGS = $(inherited) -DHAVE_SCREENSHOTS
7879
OTHER_CFLAGS = $(inherited) -DHAVE_SHADERPIPELINE
7980
OTHER_CFLAGS = $(inherited) -DHAVE_SLANG

pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@
9090
0798404C2E0F218D0079E1A3 /* huf_decompress_amd64.S in Sources */ = {isa = PBXBuildFile; fileRef = 079840352E0F20D50079E1A3 /* huf_decompress_amd64.S */; };
9191
0798404D2E0F21910079E1A3 /* huf_decompress_amd64.S in Sources */ = {isa = PBXBuildFile; fileRef = 079840352E0F20D50079E1A3 /* huf_decompress_amd64.S */; };
9292
0798404E2E0F21960079E1A3 /* huf_decompress_amd64.S in Sources */ = {isa = PBXBuildFile; fileRef = 079840352E0F20D50079E1A3 /* huf_decompress_amd64.S */; };
93-
07B9B97F2E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
94-
07B9B9802E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
95-
07B9B9812E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
96-
07B9B9822E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
9793
07ATRANS032025010700000003 /* AppleTranslateBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07ATRANS012025010700000001 /* AppleTranslateBackend.swift */; };
9894
07ATRANS042025010700000004 /* AppleTranslateBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07ATRANS012025010700000001 /* AppleTranslateBackend.swift */; };
9995
07ATRANS052025010700000005 /* AppleTranslateBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07ATRANS012025010700000001 /* AppleTranslateBackend.swift */; };
10096
07ATRANS062025010700000006 /* AppleTranslateBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07ATRANS012025010700000001 /* AppleTranslateBackend.swift */; };
97+
07B9B97F2E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
98+
07B9B9802E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
99+
07B9B9812E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
100+
07B9B9822E49A7A3007E419E /* RetroArchAppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */; };
101101
07D851CD2CAF06E2005097EA /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 075650242C488918004C5E7E /* CloudKit.framework */; };
102102
07F2BBC62BE83A4700FD1295 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
103103
07F2BBC82BE83A4700FD1295 /* assets.zip in Resources */ = {isa = PBXBuildFile; fileRef = 9254B33025FA0BA300A1E0DA /* assets.zip */; };
@@ -271,8 +271,6 @@
271271
05A8C5BA20DB72F000FF7857 /* ui_cocoa.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ui_cocoa.m; sourceTree = "<group>"; };
272272
05A8C5BD20DB72F000FF7857 /* cocoa_common.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = cocoa_common.m; sourceTree = "<group>"; };
273273
05A8C5C220DB72F000FF7857 /* cocoa_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cocoa_common.h; sourceTree = "<group>"; };
274-
07ATRANS012025010700000001 /* AppleTranslateBackend.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleTranslateBackend.swift; sourceTree = "<group>"; };
275-
07ATRANS022025010700000002 /* translation_driver_apple.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = translation_driver_apple.h; sourceTree = "<group>"; };
276274
05A8C5C820DB72F000FF7857 /* ui_qt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ui_qt.h; sourceTree = "<group>"; };
277275
05A8C5CE20DB72F000FF7857 /* ui_cocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ui_cocoa.h; sourceTree = "<group>"; };
278276
05A8C5CF20DB72F000FF7857 /* ui_cocoatouch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ui_cocoatouch.m; sourceTree = "<group>"; };
@@ -484,6 +482,8 @@
484482
0790F6782BF282B400AA58C9 /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Media.xcassets; path = OSX/Media.xcassets; sourceTree = "<group>"; };
485483
0795A8C6299A095300D5035D /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
486484
079840352E0F20D50079E1A3 /* huf_decompress_amd64.S */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = huf_decompress_amd64.S; sourceTree = "<group>"; };
485+
07ATRANS012025010700000001 /* AppleTranslateBackend.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleTranslateBackend.swift; sourceTree = "<group>"; };
486+
07ATRANS022025010700000002 /* translation_driver_apple.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = translation_driver_apple.h; sourceTree = "<group>"; };
487487
07B9B97D2E49A7A3007E419E /* RetroArchAppShortcuts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetroArchAppShortcuts.swift; sourceTree = "<group>"; };
488488
07F2BBC22BE83A4200FD1295 /* AppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppStore.xcconfig; sourceTree = "<group>"; };
489489
07F2BBE92BE83A4700FD1295 /* RetroArch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArch.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1911,8 +1911,9 @@
19111911
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
19121912
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
19131913
CLANG_ANALYZER_DEADCODE_DEADSTORES = NO;
1914-
COMMON_SDL_CFLAGS = "-DHAVE_S3";
1914+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
19151915
CURRENT_PROJECT_VERSION = 1;
1916+
DEVELOPMENT_TEAM = 3P5NQADT2U;
19161917
ENABLE_HARDENED_RUNTIME = YES;
19171918
};
19181919
name = Debug;
@@ -1924,8 +1925,9 @@
19241925
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
19251926
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
19261927
CLANG_ANALYZER_DEADCODE_DEADSTORES = NO;
1927-
COMMON_SDL_CFLAGS = "-DHAVE_S3";
1928+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
19281929
CURRENT_PROJECT_VERSION = 1;
1930+
DEVELOPMENT_TEAM = 3P5NQADT2U;
19291931
ENABLE_HARDENED_RUNTIME = YES;
19301932
};
19311933
name = Release;

tasks/task_http.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,10 @@ void* task_push_http_post_transfer_with_headers(const char *url,
552552
return task_push_http_transfer_generic(conn, url, mute, false, cb, user_data);
553553
}
554554

555-
void *task_push_http_transfer_with_content_ex(const char *url,
555+
void *task_push_http_transfer_with_content(const char *url,
556556
const char *method, const void *content, size_t content_len,
557557
const char *content_type, bool mute, bool headers_accept_err,
558-
const char *headers,
559-
retro_task_callback_t cb, void *user_data)
558+
const char *headers, retro_task_callback_t cb, void *user_data)
560559
{
561560
struct http_connection_t *conn;
562561

@@ -576,13 +575,3 @@ void *task_push_http_transfer_with_content_ex(const char *url,
576575
return task_push_http_transfer_generic(conn, url, mute,
577576
headers_accept_err, cb, user_data);
578577
}
579-
580-
void *task_push_http_transfer_with_content(const char *url,
581-
const char *method, const void *content, size_t content_len,
582-
const char *content_type, bool mute, const char *headers,
583-
retro_task_callback_t cb, void *user_data)
584-
{
585-
return task_push_http_transfer_with_content_ex(url, method, content,
586-
content_len, content_type, mute, false,
587-
headers, cb, user_data);
588-
}

tasks/tasks_internal.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ void *task_push_http_post_transfer_with_headers(const char *url, const char *pos
8080
const char *type, const char *headers, retro_task_callback_t cb, void *user_data);
8181

8282
void *task_push_http_transfer_with_content(const char *url, const char *method,
83-
const void *content, size_t content_len, const char *content_type, bool mute,
84-
const char *headers, retro_task_callback_t cb, void *user_data);
85-
86-
void *task_push_http_transfer_with_content_ex(const char *url, const char *method,
8783
const void *content, size_t content_len, const char *content_type, bool mute,
8884
bool headers_accept_err, const char *headers,
8985
retro_task_callback_t cb, void *user_data);

0 commit comments

Comments
 (0)