Skip to content

Commit a885fa2

Browse files
committed
Merge remote-tracking branch 'retropie/master' into stable
2 parents 3d22c28 + 52c04d7 commit a885fa2

27 files changed

+535
-226
lines changed

CMake/Packages/FindSDL2.cmake

Lines changed: 379 additions & 153 deletions
Large diffs are not rendered by default.

CMakeLists.txt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ cmake_minimum_required(VERSION 2.8)
22

33
option(GLES "Set to ON if targeting Embedded OpenGL" ${GLES})
44
option(GL "Set to ON if targeting Desktop OpenGL" ${GL})
5-
option(RPI "Set to ON to enable the Raspberry PI video player (omxplayer) and audio options" ${RPI})
5+
option(RPI "Set to ON to enable the Raspberry PI memory and audio options" ${RPI})
6+
option(OMX "Set to On to enable OMXPlayer for video snapshots" ${OMX})
67
option(CEC "Set to ON to enable CEC" ${CEC})
78
option(PROFILING "Set to ON to enable profiling" ${PROFILING})
89

910
# GLES implementation overrides
1011
option(USE_MESA_GLES "Set to ON to select the MESA OpenGL ES driver" ${USE_MESA_GLES})
1112
option(USE_GLES1 "Set to ON to force usage of the OpenGLES v1 renderer" ${USE_GLES1})
1213

14+
# GL implementation overrides
15+
option(USE_GL21 "Set to ON to force usage of the OpenGL v2.1 renderer" ${USE_GL21})
16+
1317
# OpenGL library preference (https://cmake.org/cmake/help/git-stage/policy/CMP0072.html)
1418
# Set it to OLD to appease older proprietary drivers without libglvnd support
1519
if(POLICY CMP0072)
@@ -72,7 +76,11 @@ set_property(CACHE GLSystem PROPERTY STRINGS "Desktop OpenGL" "Embedded OpenGL")
7276

7377
if(${GLSystem} MATCHES "Desktop OpenGL")
7478
find_package(OpenGL REQUIRED)
75-
add_definitions(-DUSE_OPENGL_14)
79+
if(NOT USE_GL21)
80+
add_definitions(-DUSE_OPENGL_14)
81+
else()
82+
add_definitions(-DUSE_OPENGL_21)
83+
endif()
7684
else()
7785
if(NOT USE_GLES1)
7886
find_package(OpenGLES2 QUIET REQUIRED)
@@ -110,6 +118,10 @@ if(DEFINED BCMHOST OR RPI)
110118
add_definitions(-D_RPI_)
111119
endif()
112120

121+
if(OMX)
122+
add_definitions(-D_OMX_)
123+
endif()
124+
113125
if(DEFINED libCEC_FOUND)
114126
add_definitions(-DHAVE_LIBCEC)
115127
endif()
@@ -159,7 +171,7 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
159171
set(COMMON_INCLUDE_DIRS
160172
${FREETYPE_INCLUDE_DIRS}
161173
${FreeImage_INCLUDE_DIRS}
162-
${SDL2_INCLUDE_DIR}
174+
${SDL2_INCLUDE_DIRS}
163175
${CURL_INCLUDE_DIR}
164176
${VLC_INCLUDE_DIR}
165177
${RAPIDJSON_INCLUDE_DIRS}
@@ -197,7 +209,7 @@ endif()
197209
set(COMMON_LIBRARIES
198210
${FREETYPE_LIBRARIES}
199211
${FreeImage_LIBRARIES}
200-
${SDL2_LIBRARY}
212+
${SDL2_LIBRARIES}
201213
${CURL_LIBRARIES}
202214
${VLC_LIBRARIES}
203215
pugixml

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ NOTE: to generate a `Debug` build on Unix/Linux, run the Makefile generation ste
5454
cmake -DCMAKE_BUILD_TYPE=Debug .
5555
```
5656

57-
**On the Raspberry Pi**
57+
**On the Raspberry Pi**
5858

5959
* Choosing a GLES implementation.
6060

6161
* if the Pi system uses the legacy/Broadcom driver, install the `libraspberry-dev` package before running `cmake` to configure the build
62-
* if the Pi system uses the Mesa VC3/V3D GL driver, build using `-DUSE_MESA_GLES=On` to choose the MESA GLES implementation. This option is _mandatory_ when compiling for a Pi4 system, since the legacy GL drivers are not supported anymore on this system.
62+
* if the Pi system uses the Mesa VC4/V3D GL driver, build using `-DUSE_MESA_GLES=On` to choose the MESA GLES implementation. This option is _mandatory_ when compiling for a Pi4 system, since the legacy GL drivers are not supported anymore on this system.
6363

64-
* Support for using `omxplayer` to play video previews in the gamelist is enabled by adding `-DRPI=On` to the build options
64+
NOTE: Starting with RasPI OS 'Bullseye', the legacy/Broadcom drivers are not supported anymore, so `-DUSE_MESA_GLES=On` should be used.
65+
66+
* Enable the audio/memory defaults by adding `-DRPI=On` to the build options
67+
* Support for using `omxplayer` to play video previews in the gamelist is enabled by adding `-DOMX=On` to the build options.
68+
NOTE: `omxplayer` support is not available on 64bit RasPI OS or in the default RasPI OS 'Bullseye' configuration.
6569

6670
**GLES build notes**
6771

es-app/src/CollectionSystemManager.cpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
260260
// found and we are removing
261261
if (name == "favorites" && file->metadata.get("favorite") == "false") {
262262
// need to check if still marked as favorite, if not remove
263-
ViewController::get()->getGameListView(curSys).get()->remove(collectionEntry, false);
263+
ViewController::get()->getGameListView(curSys).get()->remove(collectionEntry, false, true);
264264
}
265265
else
266266
{
@@ -298,8 +298,9 @@ void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limi
298298
while ((int)rootFolder->getChildrenListToDisplay().size() > limit)
299299
{
300300
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
301-
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);
301+
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false, false);
302302
}
303+
ViewController::get()->onFileChanged(rootFolder, FILE_REMOVED);
303304
}
304305

305306
// deletes all collection files from collection systems related to the source file
@@ -323,7 +324,7 @@ void CollectionSystemManager::deleteCollectionFiles(FileData* file)
323324
sysDataIt->second.needsSave = true;
324325
FileData* collectionEntry = children.at(key);
325326
SystemData* systemViewToUpdate = getSystemToView(sysDataIt->second.system);
326-
ViewController::get()->getGameListView(systemViewToUpdate).get()->remove(collectionEntry, false);
327+
ViewController::get()->getGameListView(systemViewToUpdate).get()->remove(collectionEntry, false, true);
327328
}
328329
}
329330
}
@@ -495,7 +496,7 @@ bool CollectionSystemManager::toggleGameInCollection(FileData* file, int pressco
495496
{
496497
systemViewToUpdate->getIndex()->removeFromIndex(collectionEntry);
497498
}
498-
ViewController::get()->getGameListView(systemViewToUpdate).get()->remove(collectionEntry, false);
499+
ViewController::get()->getGameListView(systemViewToUpdate).get()->remove(collectionEntry, false, true);
499500
}
500501
else
501502
{
@@ -813,16 +814,19 @@ void CollectionSystemManager::removeCollectionsFromDisplayedSystems()
813814

814815
// remove all custom collections in bundle
815816
// this should not delete the objects from memory!
816-
FileData* customRoot = mCustomCollectionsBundle->getRootFolder();
817-
std::vector<FileData*> mChildren = customRoot->getChildren();
818-
for(auto it = mChildren.cbegin(); it != mChildren.cend(); it++)
817+
if (mCustomCollectionsBundle)
819818
{
820-
customRoot->removeChild(*it);
819+
FileData* customRoot = mCustomCollectionsBundle->getRootFolder();
820+
std::vector<FileData*> mChildren = customRoot->getChildren();
821+
for(auto it = mChildren.cbegin(); it != mChildren.cend(); it++)
822+
{
823+
customRoot->removeChild(*it);
824+
}
825+
// clear index
826+
mCustomCollectionsBundle->getIndex()->resetIndex();
827+
// remove view so it's re-created as needed
828+
ViewController::get()->removeGameListView(mCustomCollectionsBundle);
821829
}
822-
// clear index
823-
mCustomCollectionsBundle->getIndex()->resetIndex();
824-
// remove view so it's re-created as needed
825-
ViewController::get()->removeGameListView(mCustomCollectionsBundle);
826830
}
827831

828832
void CollectionSystemManager::addEnabledCollectionsToDisplayedSystems(std::map<std::string, CollectionSystemData>* colSystemData)

es-app/src/FileData.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "CollectionSystemManager.h"
88
#include "FileFilterIndex.h"
99
#include "FileSorts.h"
10+
#include "InputManager.h"
1011
#include "Log.h"
1112
#include "MameNames.h"
1213
#include "platform.h"
@@ -272,6 +273,7 @@ void FileData::launchGame(Window* window)
272273

273274
AudioManager::getInstance()->deinit();
274275
VolumeControl::getInstance()->deinit();
276+
InputManager::getInstance()->deinit();
275277
window->deinit();
276278

277279
std::string command = mEnvData->mLaunchCommand;
@@ -298,6 +300,7 @@ void FileData::launchGame(Window* window)
298300
Scripting::fireEvent("game-end");
299301

300302
window->init();
303+
InputManager::getInstance()->init();
301304
VolumeControl::getInstance()->init();
302305
window->normalizeNextUpdate();
303306

es-app/src/PlatformId.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ namespace PlatformIds
8989
"vectrex",
9090
"trs-80",
9191
"coco",
92+
"ti99",
93+
"dragon32",
9294
"zmachine",
9395

9496
"ignore", // do not allow scraping for this system

es-app/src/PlatformId.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ namespace PlatformIds
9090
VECTREX,
9191
TRS80_COLOR_COMPUTER,
9292
TANDY,
93+
TI_99,
94+
DRAGON32,
9395
ZMACHINE,
9496

9597
PLATFORM_IGNORE, // do not allow scraping for this system

es-app/src/SystemScreenSaver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "SystemScreenSaver.h"
22

3-
#ifdef _RPI_
3+
#ifdef _OMX_
44
#include "components/VideoPlayerComponent.h"
55
#endif
66
#include "components/VideoVlcComponent.h"
@@ -64,7 +64,7 @@ bool SystemScreenSaver::isScreenSaverActive()
6464

6565
void SystemScreenSaver::setVideoScreensaver(std::string& path)
6666
{
67-
#ifdef _RPI_
67+
#ifdef _OMX_
6868
// Create the correct type of video component
6969
if (Settings::getInstance()->getBool("ScreenSaverOmxPlayer"))
7070
mVideoScreensaver = new VideoPlayerComponent(mWindow, getTitlePath());

es-app/src/guis/GuiGamelistOptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void GuiGamelistOptions::openMetaDataEd()
194194
{
195195
deleteBtnFunc = [this, file] {
196196
CollectionSystemManager::get()->deleteCollectionFiles(file);
197-
ViewController::get()->getGameListView(file->getSystem()).get()->remove(file, true);
197+
ViewController::get()->getGameListView(file->getSystem()).get()->remove(file, true, true);
198198
};
199199
}
200200

es-app/src/guis/GuiMenu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void GuiMenu::openSoundSettings()
164164
s->addWithLabel("ENABLE VIDEO AUDIO", video_audio);
165165
s->addSaveFunc([video_audio] { Settings::getInstance()->setBool("VideoAudio", video_audio->getState()); });
166166

167-
#ifdef _RPI_
167+
#ifdef _OMX_
168168
// OMX player Audio Device
169169
auto omx_audio_dev = std::make_shared< OptionListComponent<std::string> >(mWindow, "OMX PLAYER AUDIO DEVICE", false);
170170
std::vector<std::string> omx_cards;
@@ -463,7 +463,7 @@ void GuiMenu::openOtherSettings()
463463
s->addWithLabel("SHOW HIDDEN FILES", hidden_files);
464464
s->addSaveFunc([hidden_files] { Settings::getInstance()->setBool("ShowHiddenFiles", hidden_files->getState()); });
465465

466-
#ifdef _RPI_
466+
#ifdef _OMX_
467467
// Video Player - VideoOmxPlayer
468468
auto omx_player = std::make_shared<SwitchComponent>(mWindow);
469469
omx_player->setState(Settings::getInstance()->getBool("VideoOmxPlayer"));

0 commit comments

Comments
 (0)