Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 0798292
Merge: f8f395c de505c9
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Wed Aug 9 22:35:10 2023 +1000

    Merge pull request stenzek#2991 from andercard0/master

    Atualização Português do Brasil

commit f8f395c
Merge: 5d750a8 657d4f3
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Wed Aug 9 22:34:52 2023 +1000

    Merge pull request stenzek#2992 from IlDucci/es_ES_update_20230806

    Spanish (Spain) translation update 2023-08-06

commit 5d750a8
Author: Stenzek <stenzek@gmail.com>
Date:   Wed Aug 9 19:39:42 2023 +1000

    dep: Bump rcheevos to 3af1e2fc5188d6e932ee379942f4049ea877e648

commit 657d4f3
Author: IlDucci <pajaroloco_2@hotmail.com>
Date:   Sun Aug 6 21:18:48 2023 +0200

    Spanish (Spain) translation update 2023-08-06

    Spanish (Spain) translation update 2023-08-06 +
    Unifying the translation for the "Display" setting section.

commit 56ac3d6
Author: Stenzek <stenzek@gmail.com>
Date:   Fri Aug 4 21:39:33 2023 +1000

    HostDisplay: Fix incorrectly positioned screenshots

commit de505c9
Author: Anderson Cardoso <43047877+andercard0@users.noreply.github.com>
Date:   Sun Jul 30 12:30:09 2023 -0300

    Atualização Português do Brasil

    Atualizado para a última versão

    - Opções relacionadas ao modo controle

    OSD:
    - Correção de quebra de linha;
    - Correção de pluralização;

    Qt UI:
    - Conforme pedido, removido termo mais objetivo no modo dificílimo para hardcore.
    (Se é que alguém realmente se importa com estrangeirismos bobos) enfim, deixado para trás.

    Nota mental (para mim mesmo):
    Remover os obsoletos assim que mudado para PNT. como sou eu quem mantenho essa parte ficará assim e fim de papo!

commit 0575588
Merge: 0dee77a 1026be2
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Sun Jul 30 19:29:02 2023 +1000

    Merge pull request stenzek#2986 from charlesthobe/screensaver-fix

    Linux: fix potentially unsafe screensaver inhibitor

commit 0dee77a
Merge: 2e8b637 bbf0346
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Sun Jul 30 19:28:20 2023 +1000

    Merge pull request stenzek#2990 from CookiePLMonster/multiple-leaderboards-fix

    Achievements: Fix Leaderboard submission UI when multiple leaderboards update at once

commit bbf0346
Author: Silent <zdanio95@gmail.com>
Date:   Sat Jul 29 18:56:38 2023 +0200

    Achievements: Fix Leaderboard submission UI when multiple leaderboards update at once

commit 1026be2
Author: charlesthobe <charlesthethobe@gmail.com>
Date:   Sat Jul 8 21:47:13 2023 +0300

    Linux: fix potentially unsafe screensaver inhibitor

commit 2e8b637
Author: Stenzek <stenzek@gmail.com>
Date:   Mon Jul 24 19:27:31 2023 +1000

    scmversion: Exclude previous-latest

commit 944bf5d
Author: Stenzek <stenzek@gmail.com>
Date:   Mon Jul 24 19:24:27 2023 +1000

    RegTest: Fix build

commit 6fbdb6d
Author: Stenzek <stenzek@gmail.com>
Date:   Mon Jul 24 19:23:58 2023 +1000

    GPU: Enable GPUSTAT.28 in read mode

    Fixes Celeste Classic.

commit 72f7225
Author: Stenzek <stenzek@gmail.com>
Date:   Thu Jun 1 23:18:35 2023 +1000

    Qt: Fix ClearBindStateFromSource() executing on wrong thread

commit af5f1c7
Merge: 2d78b3f 3ea0715
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Fri Jun 30 23:07:28 2023 +1000

    Merge pull request stenzek#2984 from Mateos81/french_translation

    Update French translation

commit 3ea0715
Author: Christophe Mateos <mateos81@users.noreply.github.com>
Date:   Sun Jun 11 14:34:00 2023 +0200

    Update French translation

commit 2d78b3f
Merge: 671f856 8c6850a
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Fri Jun 9 01:20:26 2023 +1000

    Merge pull request stenzek#2983 from Mateos81/french_translation

    Update French translation

commit 8c6850a
Author: Christophe Mateos <mateos81@users.noreply.github.com>
Date:   Sun Jun 4 19:19:11 2023 +0200

    Update French translation

commit 671f856
Merge: ffb832e 36c4345
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Wed May 24 20:34:13 2023 +1000

    Merge pull request stenzek#2981 from HeatXD/patch-1

    core / system: Disc-Region Fix For Netplay

commit 36c4345
Author: Jamie Meyer <45072324+HeatXD@users.noreply.github.com>
Date:   Wed May 24 12:33:24 2023 +0200

    core / system: Disc-Region Fix For Netplay

    Fixes an issue which is only really valid for netplay since can start from an non-auto region sinc eit pulls it from the host.

commit ffb832e
Merge: fd6184b dfc0494
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Wed May 24 20:27:16 2023 +1000

    Merge pull request stenzek#2972 from andercard0/master

    Atualização Português do Brasil

commit fd6184b
Merge: 49848c8 488920a
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Wed May 24 20:27:04 2023 +1000

    Merge pull request stenzek#2977 from zkdpower/master

    update Simple-Chinese translation to latest.

commit 49848c8
Merge: d8e9808 7dca70b
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Wed May 24 20:26:48 2023 +1000

    Merge pull request stenzek#2980 from Hipnosis183/master

    Updated Spanish (Latin America) translation

commit 7dca70b
Author: Renzo Pigliacampo <renzopigliacampo@gmail.com>
Date:   Fri May 19 23:42:44 2023 -0300

    Updated Spanish (Latin America) translation

commit d8e9808
Author: Stenzek <stenzek@gmail.com>
Date:   Mon May 15 23:47:22 2023 +1000

    GameList: Add GetEntryBySerialAndHash()

commit 1b29212
Author: Stenzek <stenzek@gmail.com>
Date:   Thu May 11 00:52:06 2023 +1000

    Qt: Fix geometry not saving on shutdown

commit 9059346
Author: Stenzek <stenzek@gmail.com>
Date:   Mon May 15 23:38:53 2023 +1000

    GameDB: Remove some unused/duplicate entries

commit 9aa6c24
Author: Stenzek <stenzek@gmail.com>
Date:   Mon May 15 23:38:37 2023 +1000

    System: Store game hash as well as serial

commit 488920a
Author: zkdpower <40191866+zkdpower@users.noreply.github.com>
Date:   Sat May 13 17:34:08 2023 +0800

    update Simple-Chinese translation to latest.

commit 7681551
Author: Stenzek <stenzek@gmail.com>
Date:   Mon May 8 13:07:19 2023 +1000

    System: Don't auto enable analog on unknown games

commit eb77894
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Fri May 5 18:40:04 2023 +1000

    Update README.md

commit dfc0494
Author: Anderson Cardoso <43047877+andercard0@users.noreply.github.com>
Date:   Wed May 3 16:36:05 2023 -0300

    Atualização Português do Brasil

    Confirmação de novos textos
    Tipos de controle:
    Não conectado

commit 4811742
Merge: c6dc217 6b366af
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Thu May 4 01:00:46 2023 +1000

    Merge pull request stenzek#2965 from stenzek/resize

    HostDisplay: Treat internal res screenshots as a screenshot

commit c6dc217
Merge: b790592 4ea57da
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Thu May 4 01:00:22 2023 +1000

    Merge pull request stenzek#2970 from CharlesThobe/patch-1

    CMake: display warning when building without Wayland on systems that support Wayland

commit b790592
Merge: 4cbb6e2 6afb267
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Thu May 4 00:59:49 2023 +1000

    Merge pull request stenzek#2971 from HeatXD/fix-comment

    core: fix-comment

commit 6afb267
Author: Jamie Meyer <45072324+HeatXD@users.noreply.github.com>
Date:   Wed May 3 16:44:48 2023 +0200

    core: fix-comment

commit 4ea57da
Author: Charles the Thobe <95266557+CharlesThobe@users.noreply.github.com>
Date:   Tue May 2 09:41:04 2023 +0300

    CMake: display warning when building without Wayland on systems that support Wayland

commit 4cbb6e2
Merge: 9526e15 17f2711
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Tue May 2 21:46:32 2023 +1000

    Merge pull request stenzek#2964 from andercard0/master

    Atualização Português do Brasil

commit 9526e15
Author: Dolphin <dolphin@torikara.org>
Date:   Tue May 2 20:46:06 2023 +0900

    Update japanese translation (stenzek#2969)

    * update base duckstation-qt_ja.ts

    * update Japanese translation

    * translate controller name on controllersettingsdialog

commit d4769e1
Merge: 4f6712e 53de37e
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Tue May 2 21:45:48 2023 +1000

    Merge pull request stenzek#2967 from CharlesThobe/pr

    Linux: implement DBus screensaver inhibitor

commit 4f6712e
Merge: a003832 4143742
Author: Connor McLaughlin <stenzek@gmail.com>
Date:   Tue May 2 21:45:05 2023 +1000

    Merge pull request stenzek#2966 from IlDucci/Spanish_update_20230501

    Spanish (Spain) translation update - 2023/05/01

commit 6b366af
Author: Stenzek <stenzek@gmail.com>
Date:   Mon May 1 15:12:30 2023 +1000

    HostDisplay: Treat internal res screenshots as a screenshot

commit 53de37e
Author: CharlesThobe <charlesthethobe@gmail.com>
Date:   Mon May 1 15:17:08 2023 +0300

    Linux: implement DBus screensaver inhibitor

commit b65f189
Author: CharlesThobe <charlesthethobe@gmail.com>
Date:   Mon May 1 14:21:16 2023 +0300

    Add vscode preferences folder to .gitignore

commit 8483738
Author: CharlesThobe <charlesthethobe@gmail.com>
Date:   Mon May 1 13:29:30 2023 +0300

    Fix order of macros

commit 4143742
Author: IlDucci <pajaroloco_2@hotmail.com>
Date:   Mon May 1 11:34:28 2023 +0200

    Spanish (Spain) translation update - 2023/05/01

    Updating Spanish (Spain) translation with the latest changes.

commit 17f2711
Author: Anderson Cardoso <43047877+andercard0@users.noreply.github.com>
Date:   Sat Apr 29 20:24:23 2023 -0300

    Atualização Português do Brasil

    Configurações avançadas
    Confirmação de strings:
    -Diretório de pastas
    -Diretório PCDrv
    -Ativação PCDrv
  • Loading branch information
kamfretoz committed Aug 11, 2023
1 parent 0e0cd3b commit 7a98a75
Show file tree
Hide file tree
Showing 96 changed files with 19,317 additions and 10,285 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ipch/*
*.vcxproj.user
*.VC.opendb
*.VC.db
/.vscode/

# cmake stuff
CMakeCache.txt
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if(SUPPORTS_X11)
option(USE_X11 "Support X11 window system" ON)
endif()
if(SUPPORTS_WAYLAND)
option(USE_WAYLAND "Support Wayland window system" OFF)
option(USE_WAYLAND "Support Wayland window system" ON)
endif()
if((LINUX OR FREEBSD) OR ANDROID)
option(USE_EGL "Support EGL OpenGL context creation" ON)
Expand All @@ -53,6 +53,7 @@ if((LINUX OR FREEBSD) AND NOT ANDROID)
option(USE_DRMKMS "Support DRM/KMS OpenGL contexts" OFF)
option(USE_FBDEV "Support FBDev OpenGL contexts" OFF)
option(USE_EVDEV "Support EVDev controller interface" OFF)
option(USE_DBUS "Enable DBus support for screensaver inhibiting" ON)
endif()

# Force EGL when using Wayland
Expand Down
24 changes: 2 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,9 @@ You will need a device with armv7 (32-bit ARM), AArch64 (64-bit ARM), or x86_64

Google Play is the preferred distribution mechanism and will result in smaller download sizes: https://play.google.com/store/apps/details?id=com.github.stenzek.duckstation

**No support is provided for the Android app**, it is free and your expectations should be in line with that. Please **do not** email me about issues about it, they will be ignored. This repository should also not be used to raise issues about the app, as it does not contain the app code, only the desktop versions.
**No support is provided for the Android app**, it is free and your expectations should be in line with that. Please **do not** email me about issues about it, they will be ignored.

If you must use an APK, download links are:

Download link: https://www.duckstation.org/android/duckstation-android.apk

Changelog link: https://www.duckstation.org/android/changelog.txt
If you must use an APK, download links are listed in https://www.duckstation.org/android/

To use:
1. Install and run the app for the first time.
Expand Down Expand Up @@ -215,22 +211,6 @@ Hotkeys:
- **Tab:** Temporarily disable speed limiter
- **Space:** Pause/resume emulation

## Screenshots
<p align="center">
<a href="https://github.com/raw/stenzek/duckstation/md-images/monkey.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/monkey.jpg" alt="Monkey Hero" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/rrt4.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/rrt4.jpg" alt="Ridge Racer Type 4" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/tr2.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/tr2.jpg" alt="Tomb Raider 2" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/quake2.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/quake2.jpg" alt="Quake 2" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/croc.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/croc.jpg" alt="Croc" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/croc2.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/croc2.jpg" alt="Croc 2" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/ff7.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/ff7.jpg" alt="Final Fantasy 7" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/mm8.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/mm8.jpg" alt="Mega Man 8" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/ff8.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/ff8.jpg" alt="Final Fantasy 8 in Fullscreen UI" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/spyro.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/spyro.jpg" alt="Spyro in Fullscreen UI" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/tof.jpg"><img src="https://github.com/raw/stenzek/duckstation/md-images/tof.jpg" alt="Threads of Fate in Fullscreen UI" width="400" /></a>
<a href="https://github.com/raw/stenzek/duckstation/md-images/gamegrid.png"><img src="https://github.com/raw/stenzek/duckstation/md-images/gamegrid.png" alt="Game Grid" width="400" /></a>
</p>

## Disclaimers

Icon by icons8: https://icons8.com/icon/74847/platforms.undefined.short-title
Expand Down
3 changes: 2 additions & 1 deletion data/resources/database/gamedb.json
Original file line number Diff line number Diff line change
Expand Up @@ -46737,7 +46737,8 @@
"serial": "SLPS-02728",
"name": "Breath of Fire IV (USA) (Beta)",
"codes": [
"SLPS-02728"
"SLPS-02728",
"SLPM-87159"
],
"languages": [
"Japanese"
Expand Down
92 changes: 2 additions & 90 deletions data/resources/database/gamesettings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ ForceRecompilerICache = true
ForceRecompilerICache = true


# SCUS-94200 (Battle Arena Toshinden (USA))
[SCUS-94200]
# SCUS-94003 (Battle Arena Toshinden (USA))
[SCUS-94003]
ForceRecompilerICache = true


Expand Down Expand Up @@ -283,11 +283,6 @@ ForceRecompilerICache = true
ForceRecompilerICache = true


# SLPS-02701 (Next Tetris, The (Japan))
[SLPS-02701]
ForceRecompilerICache = true


# SLUS-00862 (Next Tetris, The (USA))
[SLUS-00862]
ForceRecompilerICache = true
Expand All @@ -303,11 +298,6 @@ ForceRecompilerICache = true
ForceRecompilerICache = true


# SLPM-87159 (Breath of Fire IV - Utsurowazaru Mono (Japan))
[SLPM-87159]
ForceRecompilerICache = true


# SLPS-02728 (Breath of Fire IV - Utsurowazaru Mono (Japan))
[SLPS-02728]
ForceRecompilerICache = true
Expand Down Expand Up @@ -533,11 +523,6 @@ ForceInterpreter = true
ForceInterlacing = true


# SLPS 02120 (Shiritsu Justice Gakuen: Nekketsu Seishun Nikki 2 (Japan))
[SLPS-02120]
ForceInterlacing = true


# Hexen (SLUS-00348)
[SLUS-00348]
DisableUpscaling = true
Expand Down Expand Up @@ -653,21 +638,11 @@ ForcePGXPCPUMode = true
ForcePGXPCPUMode = true


# SLPS-91205 (Grandia (Japan) (Disc 1))
[SLPS-91205]
ForcePGXPCPUMode = true


# SLPS-02125 (Grandia (Japan) (Disc 2))
[SLPS-02125]
ForcePGXPCPUMode = true


# SLPS-91206 (Grandia (Japan) (Disc 2))
[SLPS-91206]
ForcePGXPCPUMode = true


# SCUS-94457 (Grandia (USA) (Disc 1))
[SCUS-94457]
ForcePGXPCPUMode = true
Expand Down Expand Up @@ -976,12 +951,6 @@ DMAMaxSliceTicks = 200
GPUMaxRunAhead = 1


# SLUS-0381 (Star Wars - Rebel Assault II - The Hidden Empire (USA) (Disc 1))
[SLUS-0381]
DMAMaxSliceTicks = 200
GPUMaxRunAhead = 1


# SLUS-00386 (Star Wars - Rebel Assault II - The Hidden Empire (USA) (Disc 2))
[SLUS-00386]
DMAMaxSliceTicks = 200
Expand Down Expand Up @@ -1058,11 +1027,6 @@ DMAMaxSliceTicks = 100
DMAMaxSliceTicks = 100


# SLPS-91064 (Armored Core (Japan) (Rev 1))
[SLPS-91064]
DMAMaxSliceTicks = 100


# SCUS-94182 (Armored Core (USA))
[SCUS-94182]
DMAMaxSliceTicks = 100
Expand Down Expand Up @@ -1105,55 +1069,13 @@ DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLPS-02364 (Chrono Cross (Japan) (Disc 1))
[SLPS-02364]
ForceRecompilerICache = true
DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLPS-02777 (Chrono Cross (Japan) (Disc 1))
[SLPS-02777]
ForceRecompilerICache = true
DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLPS-91464 (Chrono Cross (Japan) (Disc 1))
[SLPS-91464]
ForceRecompilerICache = true
DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLPM-87396 (Chrono Cross (Japan) (Disc 2))
[SLPM-87396]
ForceRecompilerICache = true
DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLPS-02365 (Chrono Cross (Japan) (Disc 2))
[SLPS-02365]
ForceRecompilerICache = true
DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLPS-02778 (Chrono Cross (Japan) (Disc 2))
[SLPS-02778]
ForceRecompilerICache = true
DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLPS-91465 (Chrono Cross (Japan) (Disc 2))
[SLPS-91465]
ForceRecompilerICache = true
DMAMaxSliceTicks = 100
DMAHaltTicks = 150


# SLUS-01041 (Chrono Cross (USA) (Disc 1))
[SLUS-01041]
ForceRecompilerICache = true
Expand Down Expand Up @@ -1290,11 +1212,6 @@ DisplayActiveEndOffset = 68
ForceRecompilerLUTFastmem = True


# SLPM-86943 (Tony Hawk's Pro Skater (Japan))
[SLPM-86943]
ForceRecompilerLUTFastmem = True


# SLUS-00860 (Tony Hawk's Pro Skater (USA))
[SLUS-00860]
ForceRecompilerLUTFastmem = True
Expand Down Expand Up @@ -1390,11 +1307,6 @@ ForceRecompilerLUTFastmem = True
ForceRecompilerLUTFastmem = True


# SLPS-01009 (Lagnacure (Japan, Asia))
[SLPS-01009]
ForceRecompilerLUTFastmem = True


# SCUS-94243 (Einhaender (USA))
[SCUS-94243]
ForceRecompilerLUTFastmem = true
Expand Down
6 changes: 6 additions & 0 deletions dep/rcheevos/include/rc_api_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ rc_api_fetch_code_notes_response_t;

int rc_api_init_fetch_code_notes_request(rc_api_request_t* request, const rc_api_fetch_code_notes_request_t* api_params);
int rc_api_process_fetch_code_notes_response(rc_api_fetch_code_notes_response_t* response, const char* server_response);
int rc_api_process_fetch_code_notes_server_response(rc_api_fetch_code_notes_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_fetch_code_notes_response(rc_api_fetch_code_notes_response_t* response);

/* --- Update Code Note --- */
Expand Down Expand Up @@ -76,6 +77,7 @@ rc_api_update_code_note_response_t;

int rc_api_init_update_code_note_request(rc_api_request_t* request, const rc_api_update_code_note_request_t* api_params);
int rc_api_process_update_code_note_response(rc_api_update_code_note_response_t* response, const char* server_response);
int rc_api_process_update_code_note_server_response(rc_api_update_code_note_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_update_code_note_response(rc_api_update_code_note_response_t* response);

/* --- Update Achievement --- */
Expand Down Expand Up @@ -121,6 +123,7 @@ rc_api_update_achievement_response_t;

int rc_api_init_update_achievement_request(rc_api_request_t* request, const rc_api_update_achievement_request_t* api_params);
int rc_api_process_update_achievement_response(rc_api_update_achievement_response_t* response, const char* server_response);
int rc_api_process_update_achievement_server_response(rc_api_update_achievement_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_update_achievement_response(rc_api_update_achievement_response_t* response);

/* --- Update Leaderboard --- */
Expand Down Expand Up @@ -170,6 +173,7 @@ rc_api_update_leaderboard_response_t;

int rc_api_init_update_leaderboard_request(rc_api_request_t* request, const rc_api_update_leaderboard_request_t* api_params);
int rc_api_process_update_leaderboard_response(rc_api_update_leaderboard_response_t* response, const char* server_response);
int rc_api_process_update_leaderboard_server_response(rc_api_update_leaderboard_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_update_leaderboard_response(rc_api_update_leaderboard_response_t* response);

/* --- Fetch Badge Range --- */
Expand Down Expand Up @@ -199,6 +203,7 @@ rc_api_fetch_badge_range_response_t;

int rc_api_init_fetch_badge_range_request(rc_api_request_t* request, const rc_api_fetch_badge_range_request_t* api_params);
int rc_api_process_fetch_badge_range_response(rc_api_fetch_badge_range_response_t* response, const char* server_response);
int rc_api_process_fetch_badge_range_server_response(rc_api_fetch_badge_range_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_fetch_badge_range_response(rc_api_fetch_badge_range_response_t* response);

/* --- Add Game Hash --- */
Expand Down Expand Up @@ -238,6 +243,7 @@ rc_api_add_game_hash_response_t;

int rc_api_init_add_game_hash_request(rc_api_request_t* request, const rc_api_add_game_hash_request_t* api_params);
int rc_api_process_add_game_hash_response(rc_api_add_game_hash_response_t* response, const char* server_response);
int rc_api_process_add_game_hash_server_response(rc_api_add_game_hash_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_add_game_hash_response(rc_api_add_game_hash_response_t* response);

#ifdef __cplusplus
Expand Down
3 changes: 3 additions & 0 deletions dep/rcheevos/include/rc_api_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ rc_api_fetch_achievement_info_response_t;

int rc_api_init_fetch_achievement_info_request(rc_api_request_t* request, const rc_api_fetch_achievement_info_request_t* api_params);
int rc_api_process_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response, const char* server_response);
int rc_api_process_fetch_achievement_info_server_response(rc_api_fetch_achievement_info_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response);

/* --- Fetch Leaderboard Info --- */
Expand Down Expand Up @@ -135,6 +136,7 @@ rc_api_fetch_leaderboard_info_response_t;

int rc_api_init_fetch_leaderboard_info_request(rc_api_request_t* request, const rc_api_fetch_leaderboard_info_request_t* api_params);
int rc_api_process_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response, const char* server_response);
int rc_api_process_fetch_leaderboard_info_server_response(rc_api_fetch_leaderboard_info_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response);

/* --- Fetch Games List --- */
Expand Down Expand Up @@ -173,6 +175,7 @@ rc_api_fetch_games_list_response_t;

int rc_api_init_fetch_games_list_request(rc_api_request_t* request, const rc_api_fetch_games_list_request_t* api_params);
int rc_api_process_fetch_games_list_response(rc_api_fetch_games_list_response_t* response, const char* server_response);
int rc_api_process_fetch_games_list_server_response(rc_api_fetch_games_list_response_t* response, const rc_api_server_response_t* server_response);
void rc_api_destroy_fetch_games_list_response(rc_api_fetch_games_list_response_t* response);

#ifdef __cplusplus
Expand Down
33 changes: 28 additions & 5 deletions dep/rcheevos/include/rc_api_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,34 @@

#include "rc_error.h"

#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* A block of memory for variable length data (like strings and arrays).
*/
typedef struct rc_api_buffer_t {
typedef struct rc_api_buffer_chunk_t {
/* The current location where data is being written */
char* write;
/* The first byte past the end of data where writing cannot occur */
char* end;
/* The first byte of the data */
char* start;
/* The next block in the allocated memory chain */
struct rc_api_buffer_t* next;
/* The buffer containing the data. The actual size may be larger than 256 bytes for buffers allocated in
* the next chain. The 256 byte size specified is for the initial allocation within the container object. */
struct rc_api_buffer_chunk_t* next;
}
rc_api_buffer_chunk_t;

/**
* A preallocated block of memory for variable length data (like strings and arrays).
*/
typedef struct rc_api_buffer_t {
/* The chunk data (will point at the local data member) */
struct rc_api_buffer_chunk_t chunk;
/* Small chunk of memory pre-allocated for the chunk */
char data[256];
}
rc_api_buffer_t;
Expand All @@ -31,6 +43,8 @@ typedef struct rc_api_request_t {
const char* url;
/* Additional query args that should be sent via a POST command. If null, GET may be used */
const char* post_data;
/* The HTTP Content-Type of the POST data. */
const char* content_type;

/* Storage for the url and post_data */
rc_api_buffer_t buffer;
Expand All @@ -41,7 +55,7 @@ rc_api_request_t;
* Common attributes for all server responses.
*/
typedef struct rc_api_response_t {
/* Server-provided success indicator (non-zero on failure) */
/* Server-provided success indicator (non-zero on success, zero on failure) */
int succeeded;
/* Server-provided message associated to the failure */
const char* error_message;
Expand All @@ -56,6 +70,15 @@ void rc_api_destroy_request(rc_api_request_t* request);
void rc_api_set_host(const char* hostname);
void rc_api_set_image_host(const char* hostname);

typedef struct rc_api_server_response_t {
/* Pointer to the data returned from the server */
const char* body;
/* Length of data returned from the server (Content-Length) */
size_t body_length;
/* HTTP status code returned from the server */
int http_status_code;
} rc_api_server_response_t;

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 7a98a75

Please sign in to comment.