Closed NikosSiak closed 2 years ago
@NikosSiak can you cherry-pick 0a5b7b7b66ec7aad99044d692cec3817b3bf52cb? the order of class members is very specific to manage dependencies between them. Necessary is that all members are destructed in the opposite order as they were constructed. Constructor parameters are first in, lasting longest, so we want m_renderManager
to appear in the header right under m_gameClient
in the // Construction parameter
section. Notice how the order is reflected everywhere these are used together.
Please cherry-pick 36d7b3033d4145b72e95bacaeba6cf10e758c24b and c2216ecb7116432688d3d9869882fdd2bc6331e1. The former not only deduplicates code, but it fulfills the contract of the savestate database to provide fully filled-in CGUIListItems.
EDIT: The former needs some work
Please cherry-pick 36d7b30 and c2216ec. The former not only deduplicates code, but it fulfills the contract of the savestate database to provide fully filled-in CGUIListItems.
EDIT: The former needs some work
items[i]->SetLabel(items[i]->m_dateTime.GetAsLocalizedDateTime());
because the time was wrong (probably because of the timezone)
The time returned from that function comes from GetDirectory(), which sets the time to the file creation time (or maybe modification time). Because files can be copied/modified, we probably want the savestate creation time, which is stored in the .sav flatbuffer file.
EDIT: Yeah, see how I set created
and then forgot to use the new variable :)
I left some comments on some technical debt I saw. Doesn't need to be paid down before this is merged, but we should make a list of code scalability improvements we could make.
I've created Kodi and LibreELEC test builds based on 18.8 with your PR: https://github.com/garbear/xbmc/releases and https://github.com/kodi-game/LibreELEC.tv/releases/
few minor comments about char arrays, otherwise the new rich presence stuff looks good
Can you add descriptions to new strings using the #.
comment style?
This PR introduces a warning on non-windows platforms. See https://jenkins.kodi.tv/job/OSX-64/19334/clang/new/. Just need to make the order of the fields in the header match the initialization order in the .cpp file.
GUIDialogSelect.cpp:30:5: warning: field 'm_buttonLabel' will be initialized after field 'm_selectedItem' [-Wreorder]
m_buttonLabel(-1),
^
Small favor to ask of the comments, can you wrap lines at 80 chars?
Test builds for the final PR: https://github.com/garbear/xbmc/releases/tag/retroplayer-19.3-20220126
PR has been upstreamed: https://github.com/xbmc/xbmc/pull/20913
Description
This PR adds a savestate manager for the RetroPlayer. When the user selects a game instead of prompting him/her to select the game client the savestate manager will prompt him/her to select a savestate. If the user wants to create a new savestate or there are no savestates for the selected game then the game client prompt will be displayed. From the dialog the user can rename a savestate or delete . This PR also adds an in-game savestate manager to quickly change between savestates without exiting the game (this dialog shows only savestates created from the loaded game client). This PR includes the auto captioning feature for savestates using RetroAchievements rich presence evaluation from https://github.com/garbear/xbmc/pull/121. To get the necessary data from the RetroAchievements API the user must login to their account from the game settings. For the auto captioning feature this https://github.com/kodi-game/game.libretro/pull/67 PR must be merged. You can find test builds here
Motivation and Context
Now RetroPlayer saves only one savestate for each game and it saves it next to the rom, this changes store the savestates in a special folder and give the ability to save multiple savestate for one game
How Has This Been Tested?
Screenshots (if appropriate):
Savestate manager![image](https://user-images.githubusercontent.com/34605386/91975243-c3a37b80-ed27-11ea-82c9-3b8b065eeef0.png)
Context menu![image](https://user-images.githubusercontent.com/34605386/87928569-b2f7b880-ca8d-11ea-9d32-80e0f981ebac.png)
In game savestate manager![image](https://user-images.githubusercontent.com/34605386/91975356-f3eb1a00-ed27-11ea-815a-a44bbe9c8453.png)
Types of change
Checklist: