Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
15ff2b6
Updated for building on MacOS
palmerj May 23, 2021
86c01ff
Fixed unloadSDL and sensor issues.
phulshof May 30, 2021
551806b
Fixed imageType usage for reloadableVideo.
phulshof Jun 6, 2021
4b77013
Added LEDBlinky support.
phulshof Sep 11, 2021
78ec9d3
Added flac support. Added support for windowBorder and windowResize p…
phulshof Oct 16, 2021
7ad180c
Fixed default theme layout.xml files.
phulshof Jan 1, 2022
d66019c
Added support for jbFastForward1m, jbFastForward1m, jbFastForward5p, …
phulshof Jan 2, 2022
41fa427
Fixed Windows compile warnings.
phulshof Jan 2, 2022
5bd0297
Fixed minor length issues.
phulshof Jan 2, 2022
edb4872
Fixed minor control issues.
phulshof Jan 2, 2022
3b95a4d
Fixed some minor display issues.
phulshof Jan 2, 2022
4b59315
Added onJukeboxJump animation and isPaused as type for reloadableImag…
phulshof Feb 13, 2022
0e75f77
Added video support for mkv files.
phulshof Feb 16, 2022
2e2a49a
Fixed several memory leaks. Warnings: Far from all leaks were removed…
phulshof Mar 4, 2022
89040a9
One more memory leak gone; plenty more to go.
phulshof Mar 6, 2022
d59c26e
Added check on existence of selected Item pointer.
phulshof Mar 16, 2022
419d612
Fixed restore menu on launchExit.
phulshof Mar 22, 2022
1889a61
Updated gstreamer to 1.20 and added gstreamer 1.4 core directory to p…
phulshof Mar 26, 2022
e16e073
Fixed crash on non-existing selected item.
phulshof Mar 27, 2022
4fadd93
Changed gstreamer release back from 1.20 to 1.18. 1.20 causes sound i…
phulshof Mar 26, 2022
3bdbc6e
Reverted incorrect animation optimization.
phulshof Mar 27, 2022
5042c56
Fixed stretching for screens beyond the first screen.
phulshof Apr 3, 2022
38bc2e9
Fixed animation algorithm where it would always select linear.
phulshof Apr 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Package/Environment/Common/controls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ random = R
select = 1,Return,joyButton0
back = Escape,joyButton1
quit = Q
menu = Tab

deadZone = 20

Expand Down
16 changes: 8 additions & 8 deletions Package/Environment/Common/layouts/Aeon Nox/layout 4x3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
<!-- text_overlay -->


<reloadableText mode="system" type="title" alpha="0" x="140" y="220" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Bold.ttf" fontSize="80" loadFontSize="80" fontColor="ffffff" layer="10">
<reloadableText type="title" alpha="0" x="140" y="220" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Bold.ttf" fontSize="80" loadFontSize="80" fontColor="ffffff" layer="10">
<onEnter> <set duration=".1"><animate type="alpha" to="1"/></set></onEnter>
<onExit> <set duration=".1"><animate type="alpha" to="0"/></set></onExit>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
Expand Down Expand Up @@ -229,7 +229,7 @@
</reloadableText>


<reloadableText mode="system" type="year" alpha="0" x="140" y="320" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Regular.ttf" fontSize="30" loadFontSize="30" fontColor="ffffff" layer="10">
<reloadableText type="year" alpha="0" x="140" y="320" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Regular.ttf" fontSize="30" loadFontSize="30" fontColor="ffffff" layer="10">
<onEnter> <set duration=".1"><animate type="alpha" to="1"/></set></onEnter>
<onExit> <set duration=".1"><animate type="alpha" to="0"/></set></onExit>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
Expand Down Expand Up @@ -498,18 +498,18 @@

<!-- Device image container -->
<reloadableImage type="device" x="center" y="975" width="2000" maxHeight="4000" xOrigin="center" yOrigin="center" containerX="75" containerY="805" containerWidth="1450" containerHeight="340" layer="9">
<onEnter> <set duration=".1"><animate type="alpha" to="1"/></set></onEnter>
<onEnter> <set duration=".1"><animate type="alpha" to="0.3"/></set></onEnter>
<onExit> <set duration=".1"><animate type="alpha" to="0"/></set></onExit>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onMenuEnter>
<onMenuExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onMenuExit>
<onMenuJumpEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
<onMenuJumpEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onMenuEnter>
<onMenuJumpExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onMenuExit>
<onPlaylistEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
<onPlaylistEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onMenuEnter>
<onPlaylistExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onMenuExit>
<onHighlightEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onHighlightEnter>
<onHighlightEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onHighlightEnter>
<onHighlightExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onHighlightExit>
<onGameEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></oneGameEnter>
<onGameExit menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></oneGameExit>
<onGameExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></oneGameExit>
</reloadableImage>


Expand Down
16 changes: 8 additions & 8 deletions Package/Environment/Common/layouts/Aeon Nox/layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
<!-- text_overlay -->


<reloadableText mode="system" type="title" alpha="0" x="180" y="220" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Bold.ttf" fontSize="80" loadFontSize="80" fontColor="ffffff" layer="10">
<reloadableText type="title" alpha="0" x="180" y="220" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Bold.ttf" fontSize="80" loadFontSize="80" fontColor="ffffff" layer="10">
<onEnter> <set duration=".1"><animate type="alpha" to="1"/></set></onEnter>
<onExit> <set duration=".1"><animate type="alpha" to="0"/></set></onExit>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
Expand Down Expand Up @@ -229,7 +229,7 @@
</reloadableText>


<reloadableText mode="system" type="year" alpha="0" x="180" y="320" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Regular.ttf" fontSize="30" loadFontSize="30" fontColor="ffffff" layer="10">
<reloadableText type="year" alpha="1" x="180" y="320" maxWidth="900" height="40" xOrigin="left" yOrigin="center" font="fonts/Oswald-Regular.ttf" fontSize="30" loadFontSize="30" fontColor="ffffff" layer="10">
<onEnter> <set duration=".1"><animate type="alpha" to="1"/></set></onEnter>
<onExit> <set duration=".1"><animate type="alpha" to="0"/></set></onExit>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
Expand Down Expand Up @@ -498,18 +498,18 @@

<!-- Device image container -->
<reloadableImage type="device" x="center" y="855" width="2000" maxHeight="4000" xOrigin="center" yOrigin="center" containerX="235" containerY="685" containerWidth="1450" containerHeight="340" layer="9">
<onEnter> <set duration=".1"><animate type="alpha" to="1"/></set></onEnter>
<onEnter> <set duration=".1"><animate type="alpha" to="0.3"/></set></onEnter>
<onExit> <set duration=".1"><animate type="alpha" to="0"/></set></onExit>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
<onMenuEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onMenuEnter>
<onMenuExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onMenuExit>
<onMenuJumpEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
<onMenuJumpEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onMenuEnter>
<onMenuJumpExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onMenuExit>
<onPlaylistEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onMenuEnter>
<onPlaylistEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onMenuEnter>
<onPlaylistExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onMenuExit>
<onHighlightEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></onHighlightEnter>
<onHighlightEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></onHighlightEnter>
<onHighlightExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></onHighlightExit>
<onGameEnter menuIndex="0"><set duration=".1"><animate type="alpha" to="0"/></set></oneGameEnter>
<onGameExit menuIndex="0"><set duration=".1"><animate type="alpha" to="1"/></set></oneGameExit>
<onGameExit menuIndex="0"><set duration=".1"><animate type="alpha" to="0.3"/></set></oneGameExit>
</reloadableImage>


Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ Depending on your version of OS X the GUI will read user defined Environment var


## Mac download and compile RetroFE from source code ##

## Install the Packages

Best option is to use homebrew:

brew install
brew install sdl2 sdl2_mixer sdl2_image sdl2_ttf gstreamer \
gst-plugins-base gst-plugins-good gst-plugins-bad \
gst-plugins-ugly gst-libav

If you don't use Homebrew you will need to download and install the same dependencies as given in the linux instuctions.
You may need to export the libs with $LIBRARY_PATH and or supply the include folders with $CPATH before building.

Expand Down Expand Up @@ -94,8 +104,6 @@ Compile RetroFE and create a full environment:
Copy your live RetroFE system to any folder of your choosing:
cp -r Artifacts\linux\RetroFE /your/ideal/retrofe/path



# Compiling and installing on Windows #
** Visit the [RetroFE downloads](http://http://retrofe.nl/download/) page to download a precompiled version if you do not want to compile your own. **

Expand Down
8 changes: 8 additions & 0 deletions RetroFE/Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,18 @@ set(RETROFE_SOURCES
"${SQLITE3_ROOT}/sqlite3.c"
)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(EXECUTABLE_OUTPUT_PATH "${RETROFE_DIR}/Build" CACHE PATH "Build directory" FORCE)
set(LIBRARY_OUTPUT_PATH "${RETROFE_DIR}/Build" CACHE PATH "Build directory" FORCE)

IF(APPLE)
# Fix linking on 10.14+. See https://stackoverflow.com/questions/54068035
LINK_DIRECTORIES(/usr/local/lib)
# can't brew link gettext, so we need to pass the path to the library
LINK_DIRECTORIES(/usr/local/opt/gettext/lib)
ENDIF()

include_directories(${RETROFE_INCLUDE_DIRS})
add_executable(retrofe ${RETROFE_SOURCES} ${RETROFE_HEADERS})
Expand Down
23 changes: 15 additions & 8 deletions RetroFE/Source/Collection/CollectionInfoBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ bool CollectionInfoBuilder::ImportBasicList(CollectionInfo *info, std::string fi

if (!found)
{
Item *i = new Item();
Item *i = new Item();

line.erase( std::remove(line.begin(), line.end(), '\r'), line.end() );

Expand Down Expand Up @@ -309,16 +309,18 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info, std::string me
ImportBasicList(info, includeFile, includeFilter);
ImportBasicList(info, excludeFile, excludeFilter);

if (showMissing)
for(std::vector<Item *>::iterator it = includeFilterUnsorted.begin(); it != includeFilterUnsorted.end(); ++it)
{
for(std::vector<Item *>::iterator it = includeFilterUnsorted.begin(); it != includeFilterUnsorted.end(); ++it)
if (showMissing && excludeFilter.find((*it)->name) == excludeFilter.end())
{
if (excludeFilter.find((*it)->name) == excludeFilter.end())
{
info->items.push_back(*it);
}
info->items.push_back(*it);
}
else
{
delete *it;
}
}
includeFilterUnsorted.clear( );

// Read ROM directory if showMissing is false
if (!showMissing || includeFilter.size() == 0)
Expand Down Expand Up @@ -469,7 +471,12 @@ void CollectionInfoBuilder::addPlaylists(CollectionInfo *info)
}
}
}

while ( playlistFilter.size( ) > 0 )
{
std::map<std::string, Item *>::iterator it = playlistFilter.begin();
delete it->second;
playlistFilter.erase( it->first );
}
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions RetroFE/Source/Control/UserInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ bool UserInput::initialize()
MapKey("togglePlaylist", KeyCodeTogglePlaylist, false);
MapKey("random", KeyCodeRandom, false);
MapKey("menu", KeyCodeMenu, false);
MapKey("reboot", KeyCodeReboot, false);
MapKey("saveFirstPlaylist", KeyCodeSaveFirstPlaylist, false);
MapKey("reboot", KeyCodeReboot, false);
MapKey("saveFirstPlaylist", KeyCodeSaveFirstPlaylist, false);
MapKey("jbFastForward1m", KeyCodeSkipForward, false);
MapKey("jbFastRewind1m", KeyCodeSkipBackward, false);
MapKey("jbFastForward5p", KeyCodeSkipForwardp, false);
MapKey("jbFastRewind5p", KeyCodeSkipBackwardp, false);
MapKey("jbPause", KeyCodePause, false);
MapKey("jbRestart", KeyCodeRestart, false);

bool retVal = true;

Expand Down
12 changes: 9 additions & 3 deletions RetroFE/Source/Control/UserInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ class UserInput
KeyCodeMenu,
KeyCodeAddPlaylist,
KeyCodeRemovePlaylist,
KeyCodeTogglePlaylist,
KeyCodeTogglePlaylist,
KeyCodeAdminMode,
KeyCodeHideItem,
KeyCodeQuit,
KeyCodeReboot,
KeyCodeSaveFirstPlaylist,
KeyCodeReboot,
KeyCodeSaveFirstPlaylist,
KeyCodeSkipForward,
KeyCodeSkipBackward,
KeyCodeSkipForwardp,
KeyCodeSkipBackwardp,
KeyCodePause,
KeyCodeRestart,
KeyCodeMax
};

Expand Down
75 changes: 67 additions & 8 deletions RetroFE/Source/Execute/Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,62 @@ bool Launcher::run(std::string collection, Item *collectionItem)
return reboot;
}


void Launcher::LEDBlinky( int command, std::string collection, Item *collectionItem )
{
std::string LEDBlinkyDirectory = "";
config_.getProperty( "LEDBlinkyDirectory", LEDBlinkyDirectory );
std::string exe = LEDBlinkyDirectory + "\\LEDBlinky.exe";
std::string args = std::to_string( command );
bool wait = false;
if ( command == 2 )
wait = true;
if ( command == 8 )
{
std::string launcherName = collectionItem->collectionInfo->launcher;
std::string launcherFile = Utils::combinePath( Configuration::absolutePath, "collections", collectionItem->collectionInfo->name, "launchers", collectionItem->name + ".conf" );
std::ifstream launcherStream( launcherFile.c_str( ) );
if (launcherStream.good( )) // Launcher file found
{
std::string line;
if (std::getline( launcherStream, line)) // Launcher found
{
launcherName = line;
}
}
launcherName = Utils::toLower( launcherName );
std::string emulator = collection;
config_.getProperty("launchers." + launcherName + ".LEDBlinkyEmulator", emulator );
args = args + " \"" + emulator + "\"";
}
if ( command == 3 || command == 9 )
{
std::string launcherName = collectionItem->collectionInfo->launcher;
std::string launcherFile = Utils::combinePath( Configuration::absolutePath, "collections", collectionItem->collectionInfo->name, "launchers", collectionItem->name + ".conf" );
std::ifstream launcherStream( launcherFile.c_str( ) );
if (launcherStream.good( )) // Launcher file found
{
std::string line;
if (std::getline( launcherStream, line)) // Launcher found
{
launcherName = line;
}
}
launcherName = Utils::toLower( launcherName );
std::string emulator = launcherName;
config_.getProperty("launchers." + launcherName + ".LEDBlinkyEmulator", emulator );
args = args + " \"" + collectionItem->name + "\" \"" + emulator + "\"";
if ( emulator == "" )
return;
}
if ( LEDBlinkyDirectory != "" && !execute( exe, args, LEDBlinkyDirectory, wait ) )
{
Logger::write( Logger::ZONE_ERROR, "LEDBlinky", "Failed to launch." );
}
return;
}


std::string Launcher::replaceVariables(std::string str,
std::string itemFilePath,
std::string itemName,
Expand All @@ -151,7 +207,7 @@ std::string Launcher::replaceVariables(std::string str,
return str;
}

bool Launcher::execute(std::string executable, std::string args, std::string currentDirectory)
bool Launcher::execute(std::string executable, std::string args, std::string currentDirectory, bool wait)
{
bool retVal = false;
std::string executionString = "\"" + executable + "\" " + args;
Expand Down Expand Up @@ -192,13 +248,16 @@ bool Launcher::execute(std::string executable, std::string args, std::string cur
else
{
#ifdef WIN32
while(WAIT_OBJECT_0 != MsgWaitForMultipleObjects(1, &processInfo.hProcess, FALSE, INFINITE, QS_ALLINPUT))
{
MSG msg;
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
DispatchMessage(&msg);
}
if ( wait )
{
while(WAIT_OBJECT_0 != MsgWaitForMultipleObjects(1, &processInfo.hProcess, FALSE, INFINITE, QS_ALLINPUT))
{
MSG msg;
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
DispatchMessage(&msg);
}
}
}

// result = GetExitCodeProcess(processInfo.hProcess, &exitCode);
Expand Down
3 changes: 2 additions & 1 deletion RetroFE/Source/Execute/Launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Launcher
public:
Launcher(Configuration &c);
bool run(std::string collection, Item *collectionItem);
void LEDBlinky( int command, std::string collection = "", Item *collectionItem = NULL);

private:
std::string replaceString(
Expand All @@ -38,7 +39,7 @@ class Launcher
bool launcherArgs(std::string &args, std::string launcherName);
bool extensions(std::string &extensions, std::string launcherName);
bool collectionDirectory(std::string &directory, std::string collection);
bool execute(std::string executable, std::string arguments, std::string currentDirectory);
bool execute(std::string executable, std::string arguments, std::string currentDirectory, bool wait = true);
bool findFile(std::string &foundFilePath, std::string &foundFilename, std::string directory, std::string filenameWithoutExtension, std::string extensions);
std::string replaceVariables(std::string str,
std::string itemFilePath,
Expand Down
4 changes: 0 additions & 4 deletions RetroFE/Source/Graphics/Animate/AnimationEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,16 @@ Animation *AnimationEvents::getAnimation(std::string tween)
Animation *AnimationEvents::getAnimation(std::string tween, int index)
{
if(animationMap_.find(tween) == animationMap_.end())
{
animationMap_[tween][-1] = new Animation();
}

if(animationMap_[tween].find(index) == animationMap_[tween].end())
{
index = -1;

if(animationMap_[tween].find(index) == animationMap_[tween].end())
{
animationMap_[tween][index] = new Animation();
}
}

return animationMap_[tween][index];
}

Expand Down
Loading