Skip to content

Commit

Permalink
Merge pull request #2 from SternXD/uwp-backup
Browse files Browse the repository at this point in the history
pr for history
  • Loading branch information
SternXD authored Jun 25, 2024
2 parents a44807b + 8d02b2c commit d8e3f5c
Show file tree
Hide file tree
Showing 91 changed files with 155,218 additions and 131,896 deletions.
35 changes: 35 additions & 0 deletions 3rdparty/rcheevos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# v11.4.0
* add RC_CONDITION_REMEMBER and RC_OPERAND_RECALL
* add RC_OPERATOR_ADD and RC_OPERATOR_SUB
* add scratch pad memory to PSX memory map
* add Super Game Module memory to Colecovision memory map
* add rapi function fetch_game_titles
* modify progress functions to return RC_NO_GAME_LOADED when "Unknown Game" is loaded
* update subsystem list for arcade hash
* fix exception if server sends null as achievement.author

# v11.3.0
* add RC_OPERATOR_MOD
* add cartridge RAM to Game Gear and Master System memory maps
* add extended cartridge RAM to Gameboy and Gameboy Color memory maps
* add rc_client_is_game_loaded helper function
* add rc_client_raintegration_set_console_id to specify console in case game resolution fails
* add rc_client_raintegration_get_achievement_state to detect local unlocks
* report validation errors on multi-condition logic
* hash whole file for PSP homebrew files (eboot.pbp)
* call DrawMenuBar in rc_client_raintegration_rebuild_submenu if menu changes
* fix file sharing issue using default filereader on Windows
* fix exception calling rc_client_get_game_summary with an unidentified game loaded

# v11.2.0
* add alternate methods for state serialization/deserialization that accept a buffer_size parameter
* add RC_CLIENT_SUPPORTS_HASH compile flag
- allows rc_client code to build without the rhash files (except md5.c)
- must be explicitly defined to use rc_client_begin_identify_and_load_game
* add rc_client_get_load_game_state
* add rc_client_raintegration_set_get_game_name_function
* add RC_MEMSIZE_DOUBLE32 and RC_MEMSIZE_DOUBLE32_BE
* exclude directory records from ZIP hash algorithm
* fix media host when explicitly setting host to production server
* fix potential out-of-bounds read looking for error message in non-JSON response

# v11.1.0
* add rc_client_get_user_agent_clause to generate substring to include in client User-Agents
* add rc_client_can_pause function to control pause spam
Expand Down
2 changes: 0 additions & 2 deletions 3rdparty/rcheevos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ add_library(rcheevos
src/rc_compat.h
src/rc_util.c
src/rc_version.h
src/rhash/cdreader.c
src/rhash/hash.c
src/rhash/md5.c
src/rhash/md5.h
src/rurl/url.c
Expand Down
6 changes: 6 additions & 0 deletions 3rdparty/rcheevos/include/rc_api_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ typedef struct rc_api_fetch_code_notes_response_t {
rc_api_fetch_code_notes_response_t;

RC_EXPORT int RC_CCONV rc_api_init_fetch_code_notes_request(rc_api_request_t* request, const rc_api_fetch_code_notes_request_t* api_params);
/* [deprecated] use rc_api_process_fetch_code_notes_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_fetch_code_notes_response(rc_api_fetch_code_notes_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_fetch_code_notes_server_response(rc_api_fetch_code_notes_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_fetch_code_notes_response(rc_api_fetch_code_notes_response_t* response);
Expand Down Expand Up @@ -76,6 +77,7 @@ typedef struct rc_api_update_code_note_response_t {
rc_api_update_code_note_response_t;

RC_EXPORT int RC_CCONV rc_api_init_update_code_note_request(rc_api_request_t* request, const rc_api_update_code_note_request_t* api_params);
/* [deprecated] use rc_api_process_update_code_note_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_update_code_note_response(rc_api_update_code_note_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_update_code_note_server_response(rc_api_update_code_note_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_update_code_note_response(rc_api_update_code_note_response_t* response);
Expand Down Expand Up @@ -124,6 +126,7 @@ typedef struct rc_api_update_achievement_response_t {
rc_api_update_achievement_response_t;

RC_EXPORT int RC_CCONV rc_api_init_update_achievement_request(rc_api_request_t* request, const rc_api_update_achievement_request_t* api_params);
/* [deprecated] use rc_api_process_update_achievement_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_update_achievement_response(rc_api_update_achievement_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_update_achievement_server_response(rc_api_update_achievement_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_update_achievement_response(rc_api_update_achievement_response_t* response);
Expand Down Expand Up @@ -174,6 +177,7 @@ typedef struct rc_api_update_leaderboard_response_t {
rc_api_update_leaderboard_response_t;

RC_EXPORT int RC_CCONV rc_api_init_update_leaderboard_request(rc_api_request_t* request, const rc_api_update_leaderboard_request_t* api_params);
/* [deprecated] use rc_api_process_update_leaderboard_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_update_leaderboard_response(rc_api_update_leaderboard_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_update_leaderboard_server_response(rc_api_update_leaderboard_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_update_leaderboard_response(rc_api_update_leaderboard_response_t* response);
Expand Down Expand Up @@ -204,6 +208,7 @@ typedef struct rc_api_fetch_badge_range_response_t {
rc_api_fetch_badge_range_response_t;

RC_EXPORT int RC_CCONV rc_api_init_fetch_badge_range_request(rc_api_request_t* request, const rc_api_fetch_badge_range_request_t* api_params);
/* [deprecated] use rc_api_process_fetch_badge_range_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_fetch_badge_range_response(rc_api_fetch_badge_range_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_fetch_badge_range_server_response(rc_api_fetch_badge_range_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_fetch_badge_range_response(rc_api_fetch_badge_range_response_t* response);
Expand Down Expand Up @@ -244,6 +249,7 @@ typedef struct rc_api_add_game_hash_response_t {
rc_api_add_game_hash_response_t;

RC_EXPORT int RC_CCONV rc_api_init_add_game_hash_request(rc_api_request_t* request, const rc_api_add_game_hash_request_t* api_params);
/* [deprecated] use rc_api_process_add_game_hash_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_add_game_hash_response(rc_api_add_game_hash_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_add_game_hash_server_response(rc_api_add_game_hash_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_add_game_hash_response(rc_api_add_game_hash_response_t* response);
Expand Down
45 changes: 45 additions & 0 deletions 3rdparty/rcheevos/include/rc_api_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ typedef struct rc_api_fetch_achievement_info_response_t {
rc_api_fetch_achievement_info_response_t;

RC_EXPORT int RC_CCONV rc_api_init_fetch_achievement_info_request(rc_api_request_t* request, const rc_api_fetch_achievement_info_request_t* api_params);
/* [deprecated] use rc_api_process_fetch_achievement_info_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_fetch_achievement_info_server_response(rc_api_fetch_achievement_info_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response);
Expand Down Expand Up @@ -134,6 +135,7 @@ typedef struct rc_api_fetch_leaderboard_info_response_t {
rc_api_fetch_leaderboard_info_response_t;

RC_EXPORT int RC_CCONV rc_api_init_fetch_leaderboard_info_request(rc_api_request_t* request, const rc_api_fetch_leaderboard_info_request_t* api_params);
/* [deprecated] use rc_api_process_fetch_leaderboard_info_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_fetch_leaderboard_info_server_response(rc_api_fetch_leaderboard_info_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response);
Expand Down Expand Up @@ -173,10 +175,53 @@ typedef struct rc_api_fetch_games_list_response_t {
rc_api_fetch_games_list_response_t;

RC_EXPORT int RC_CCONV rc_api_init_fetch_games_list_request(rc_api_request_t* request, const rc_api_fetch_games_list_request_t* api_params);
/* [deprecated] use rc_api_process_fetch_games_list_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_fetch_games_list_response(rc_api_fetch_games_list_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_fetch_games_list_server_response(rc_api_fetch_games_list_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_fetch_games_list_response(rc_api_fetch_games_list_response_t* response);

/* --- Fetch Game Titles --- */

/**
* API parameters for a fetch games list request.
*/
typedef struct rc_api_fetch_game_titles_request_t {
/* An array of game ids to fetch titles for */
const uint32_t* game_ids;
/* The number of items in the game_ids array */
uint32_t num_game_ids;
}
rc_api_fetch_game_titles_request_t;

/* A game title entry */
typedef struct rc_api_game_title_entry_t {
/* The unique identifier of the game */
uint32_t id;
/* The title of the game */
const char* title;
/* The image name for the game badge */
const char* image_name;
}
rc_api_game_title_entry_t;

/**
* Response data for a fetch games title request.
*/
typedef struct rc_api_fetch_game_titles_response_t {
/* An array of requested entries */
rc_api_game_title_entry_t* entries;
/* The number of items in the entries array */
uint32_t num_entries;

/* Common server-provided response information */
rc_api_response_t response;
}
rc_api_fetch_game_titles_response_t;

RC_EXPORT int RC_CCONV rc_api_init_fetch_game_titles_request(rc_api_request_t* request, const rc_api_fetch_game_titles_request_t* api_params);
RC_EXPORT int RC_CCONV rc_api_process_fetch_game_titles_server_response(rc_api_fetch_game_titles_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_fetch_game_titles_response(rc_api_fetch_game_titles_response_t* response);

RC_END_C_DECLS

#endif /* RC_API_INFO_H */
3 changes: 3 additions & 0 deletions 3rdparty/rcheevos/include/rc_api_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ typedef struct rc_api_login_response_t {
rc_api_login_response_t;

RC_EXPORT int RC_CCONV rc_api_init_login_request(rc_api_request_t* request, const rc_api_login_request_t* api_params);
/* [deprecated] use rc_api_process_login_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_login_response(rc_api_login_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_login_server_response(rc_api_login_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_login_response(rc_api_login_response_t* response);
Expand Down Expand Up @@ -104,6 +105,7 @@ typedef struct rc_api_start_session_response_t {
rc_api_start_session_response_t;

RC_EXPORT int RC_CCONV rc_api_init_start_session_request(rc_api_request_t* request, const rc_api_start_session_request_t* api_params);
/* [deprecated] use rc_api_process_start_session_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_start_session_response(rc_api_start_session_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_start_session_server_response(rc_api_start_session_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_start_session_response(rc_api_start_session_response_t* response);
Expand Down Expand Up @@ -140,6 +142,7 @@ typedef struct rc_api_fetch_user_unlocks_response_t {
rc_api_fetch_user_unlocks_response_t;

RC_EXPORT int RC_CCONV rc_api_init_fetch_user_unlocks_request(rc_api_request_t* request, const rc_api_fetch_user_unlocks_request_t* api_params);
/* [deprecated] use rc_api_process_fetch_user_unlocks_server_response instead */
RC_EXPORT int RC_CCONV rc_api_process_fetch_user_unlocks_response(rc_api_fetch_user_unlocks_response_t* response, const char* server_response);
RC_EXPORT int RC_CCONV rc_api_process_fetch_user_unlocks_server_response(rc_api_fetch_user_unlocks_response_t* response, const rc_api_server_response_t* server_response);
RC_EXPORT void RC_CCONV rc_api_destroy_fetch_user_unlocks_response(rc_api_fetch_user_unlocks_response_t* response);
Expand Down
44 changes: 44 additions & 0 deletions 3rdparty/rcheevos/include/rc_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,41 @@ RC_EXPORT void RC_CCONV rc_client_get_user_game_summary(const rc_client_t* clien
| Game |
\*****************************************************************************/

#ifdef RC_CLIENT_SUPPORTS_HASH
/**
* Start loading an unidentified game.
*/
RC_EXPORT rc_client_async_handle_t* RC_CCONV rc_client_begin_identify_and_load_game(rc_client_t* client,
uint32_t console_id, const char* file_path,
const uint8_t* data, size_t data_size,
rc_client_callback_t callback, void* callback_userdata);
#endif

/**
* Start loading a game.
*/
RC_EXPORT rc_client_async_handle_t* RC_CCONV rc_client_begin_load_game(rc_client_t* client, const char* hash,
rc_client_callback_t callback, void* callback_userdata);

/**
* Gets the current progress of the asynchronous load game process.
*/
RC_EXPORT int RC_CCONV rc_client_get_load_game_state(const rc_client_t* client);
enum {
RC_CLIENT_LOAD_GAME_STATE_NONE,
RC_CLIENT_LOAD_GAME_STATE_IDENTIFYING_GAME,
RC_CLIENT_LOAD_GAME_STATE_AWAIT_LOGIN,
RC_CLIENT_LOAD_GAME_STATE_FETCHING_GAME_DATA,
RC_CLIENT_LOAD_GAME_STATE_STARTING_SESSION,
RC_CLIENT_LOAD_GAME_STATE_DONE,
RC_CLIENT_LOAD_GAME_STATE_ABORTED
};

/**
* Determines if a game was successfully identified and loaded.
*/
RC_EXPORT int RC_CCONV rc_client_is_game_loaded(const rc_client_t* client);

/**
* Unloads the current game.
*/
Expand All @@ -250,6 +271,7 @@ typedef struct rc_client_game_t {

/**
* Get information about the current game. Returns NULL if no game is loaded.
* NOTE: returns a dummy game record if an unidentified game is loaded.
*/
RC_EXPORT const rc_client_game_t* RC_CCONV rc_client_get_game_info(const rc_client_t* client);

Expand All @@ -259,11 +281,19 @@ RC_EXPORT const rc_client_game_t* RC_CCONV rc_client_get_game_info(const rc_clie
*/
RC_EXPORT int RC_CCONV rc_client_game_get_image_url(const rc_client_game_t* game, char buffer[], size_t buffer_size);

#ifdef RC_CLIENT_SUPPORTS_HASH
/**
* Changes the active disc in a multi-disc game.
*/
RC_EXPORT rc_client_async_handle_t* RC_CCONV rc_client_begin_change_media(rc_client_t* client, const char* file_path,
const uint8_t* data, size_t data_size, rc_client_callback_t callback, void* callback_userdata);
#endif

/**
* Changes the active disc in a multi-disc game.
*/
RC_EXPORT rc_client_async_handle_t* RC_CCONV rc_client_begin_change_media_from_hash(rc_client_t* client, const char* hash,
rc_client_callback_t callback, void* callback_userdata);

/*****************************************************************************\
| Subsets |
Expand Down Expand Up @@ -663,15 +693,29 @@ RC_EXPORT size_t RC_CCONV rc_client_progress_size(rc_client_t* client);
/**
* Serializes the runtime state into a buffer.
* Returns RC_OK on success, or an error indicator.
* [deprecated] use rc_client_serialize_progress_sized instead
*/
RC_EXPORT int RC_CCONV rc_client_serialize_progress(rc_client_t* client, uint8_t* buffer);

/**
* Serializes the runtime state into a buffer.
* Returns RC_OK on success, or an error indicator.
*/
RC_EXPORT int RC_CCONV rc_client_serialize_progress_sized(rc_client_t* client, uint8_t* buffer, size_t buffer_size);

/**
* Deserializes the runtime state from a buffer.
* Returns RC_OK on success, or an error indicator.
* [deprecated] use rc_client_deserialize_progress_sized instead
*/
RC_EXPORT int RC_CCONV rc_client_deserialize_progress(rc_client_t* client, const uint8_t* serialized);

/**
* Serializes the runtime state into a buffer.
* Returns RC_OK on success, or an error indicator.
*/
RC_EXPORT int RC_CCONV rc_client_deserialize_progress_sized(rc_client_t* client, const uint8_t* serialized, size_t serialized_size);

RC_END_C_DECLS

#endif /* RC_RUNTIME_H */
17 changes: 16 additions & 1 deletion 3rdparty/rcheevos/include/rc_client_raintegration.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ typedef struct rc_client_raintegration_menu_t {
uint32_t num_items;
} rc_client_raintegration_menu_t;

enum {
RC_CLIENT_RAINTEGRATION_ACHIEVEMENT_STATE_NONE = 0,
RC_CLIENT_RAINTEGRATION_ACHIEVEMENT_STATE_PUBLISHED = 1,
RC_CLIENT_RAINTEGRATION_ACHIEVEMENT_STATE_LOCAL = 2,
RC_CLIENT_RAINTEGRATION_ACHIEVEMENT_STATE_MODIFIED = 3,
RC_CLIENT_RAINTEGRATION_ACHIEVEMENT_STATE_INSECURE = 4,
};

enum {
RC_CLIENT_RAINTEGRATION_EVENT_TYPE_NONE = 0,
RC_CLIENT_RAINTEGRATION_EVENT_MENUITEM_CHECKED_CHANGED = 1, /* [menu_item] checked changed */
Expand All @@ -46,6 +54,8 @@ typedef void (RC_CCONV *rc_client_raintegration_event_handler_t)(const rc_client
typedef void (RC_CCONV *rc_client_raintegration_write_memory_func_t)(uint32_t address, uint8_t* buffer,
uint32_t num_bytes, rc_client_t* client);

typedef void (RC_CCONV* rc_client_raintegration_get_game_name_func_t)(char* buffer, uint32_t buffer_size, rc_client_t* client);

/* types needed to integrate raintegration */

#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
Expand All @@ -71,13 +81,18 @@ RC_EXPORT const rc_client_raintegration_menu_t* RC_CCONV rc_client_raintegration

RC_EXPORT void RC_CCONV rc_client_raintegration_rebuild_submenu(rc_client_t* client, HMENU hMenu);
RC_EXPORT void RC_CCONV rc_client_raintegration_update_menu_item(const rc_client_t* client, const rc_client_raintegration_menu_item_t* menu_item);
RC_EXPORT int RC_CCONV rc_client_raintegration_activate_menu_item(const rc_client_t* client, uint32_t nMenuItemId);
RC_EXPORT int RC_CCONV rc_client_raintegration_activate_menu_item(const rc_client_t* client, uint32_t menu_item_id);

RC_EXPORT void RC_CCONV rc_client_raintegration_set_write_memory_function(rc_client_t* client, rc_client_raintegration_write_memory_func_t handler);
RC_EXPORT void RC_CCONV rc_client_raintegration_set_get_game_name_function(rc_client_t* client, rc_client_raintegration_get_game_name_func_t handler);
RC_EXPORT void RC_CCONV rc_client_raintegration_set_console_id(rc_client_t* client, uint32_t console_id);
RC_EXPORT int RC_CCONV rc_client_raintegration_has_modifications(const rc_client_t* client);

RC_EXPORT void RC_CCONV rc_client_raintegration_set_event_handler(rc_client_t* client,
rc_client_raintegration_event_handler_t handler);

RC_EXPORT int RC_CCONV rc_client_raintegration_get_achievement_state(const rc_client_t* client, uint32_t achievement_id);

#endif /* RC_CLIENT_SUPPORTS_RAINTEGRATION */

RC_END_C_DECLS
Expand Down
5 changes: 4 additions & 1 deletion 3rdparty/rcheevos/include/rc_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ enum {
RC_NO_RESPONSE = -32,
RC_ACCESS_DENIED = -33,
RC_INVALID_CREDENTIALS = -34,
RC_EXPIRED_TOKEN = -35
RC_EXPIRED_TOKEN = -35,
RC_INSUFFICIENT_BUFFER = -36,
RC_INVALID_VARIABLE_NAME = -37,
RC_UNKNOWN_VARIABLE_NAME = -38
};

RC_EXPORT const char* RC_CCONV rc_error_str(int ret);
Expand Down
Loading

0 comments on commit d8e3f5c

Please sign in to comment.