This commit is contained in:
thrust26 2021-04-17 18:40:24 +02:00
commit dff3a2a874
6 changed files with 27 additions and 13 deletions

View File

@ -181,6 +181,15 @@ class MediaFactory
#endif
}
static bool openURL(const string& url)
{
#if defined(SDL_SUPPORT)
return SDLOpenURL(url);
#else
return false;
#endif
}
private:
// Following constructors and assignment operators not supported
MediaFactory() = delete;

View File

@ -54,4 +54,13 @@ static inline string SDLVersion()
return buf.str();
}
static inline bool SDLOpenURL(const string& url)
{
#if SDL_VERSION_ATLEAST(2,0,14)
return SDL_OpenURL(url.c_str()) == 0;
#else
return false;
#endif
}
#endif // SDL_LIB_HXX

View File

@ -1482,7 +1482,7 @@ static const BSPF::array2D<const char*, DEF_PROPS_SIZE, 28> DefProps = {{
{ "68760b82fc5dcf3fedf84376a4944bf9", "CCE", "C-860", "Laser Gate (1983) (CCE)", "AKA Innerspace", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "687c23224e26f81c56e431c24faea36d", "", "", "Qb (Simple Background Animation) (2001) (AD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
{ "68878250e106eb6c7754bc2519d780a0", "CCE", "C-809", "Squirrel (1983) (CCE)", "AKA Snail Against Squirrel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "689f49e31cac68db8a2cf8f44fa7a01a", "Óscar Toledo G., Thomas Jentzsch, Nathan Strum", "", "Aardvark (2019) (PAL60)", "", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
{ "689f49e31cac68db8a2cf8f44fa7a01a", "Oscar Toledo G., Thomas Jentzsch, Nathan Strum", "", "Aardvark (2019) (PAL60)", "", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
{ "68ac69b8e1ba83af8792f693f5ae7783", "Digivision", "", "Fathon (Digivision)", "AKA Fathom", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "68c80e7e1d30df98a0cf67ecbf39cc67", "Hozer Video Games", "", "Gunfight 2600 - One Step Forward & Two Steps Back (2001) (MP)", "", "New Release", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "68c938a2a2b45c37db50509f1037fe6e", "Omegamatrix", "", "Star Wars Arcade (Atari Mouse) v4 (Omegamatrix)", "Uses Atari Mouse Controller", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -1859,7 +1859,7 @@ static const BSPF::array2D<const char*, DEF_PROPS_SIZE, 28> DefProps = {{
{ "82c25d1c35e6ac6f893d1d7c2fc2f9c8", "Atari, Larry Kaplan", "CX2628, CX2628P", "Bowling (1979) (Atari) (PAL) (4K)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "82de957d155fc041fc6afb8315a28550", "Coleco, Joseph Biel", "2457", "Venture (1982) (Coleco) (Prototype)", "2K", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "82e7aab602c378cffdd8186a099e807e", "", "", "Space Robot (Unknown)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "82ee056af81203af58092ff2e6cf079d", "Óscar Toledo G., Thomas Jentzsch, Nathan Strum", "", "Aardvark (2019) (NTSC)", "", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
{ "82ee056af81203af58092ff2e6cf079d", "Oscar Toledo G., Thomas Jentzsch, Nathan Strum", "", "Aardvark (2019) (NTSC)", "", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
{ "82efe7984783e23a7c55266a5125c68e", "CCE", "C-837", "Pizza Chef (1983) (CCE)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "834a2273e97aec3181ee127917b4b269", "Quelle", "043.151 0, 874.382 5", "Die hungrigen Froesche (1983) (Quelle) (PAL)", "AKA Frogs and Flies", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "835759ff95c2cdc2324d7c1e7c5fa237", "20th Century Fox Video Games, Frank Cohen, Douglas 'Dallas North' Neubauer", "11011", "M.A.S.H (1983) (20th Century Fox)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },

View File

@ -3306,8 +3306,8 @@ EventHandler::MenuActionList EventHandler::ourMenuActionList = { {
{ Event::UIPrevDir, "Parent directory", "" },
{ Event::ToggleFullScreen, "Toggle fullscreen", "" },
{ Event::UIHelp, "Help" "" },
{ Event::Quit, "Quit", "" }
{ Event::Quit, "Quit", "" },
{ Event::UIHelp, "Help", "" }
} };
// Event groups

View File

@ -9098,7 +9098,7 @@
""
"Cart.MD5" "689f49e31cac68db8a2cf8f44fa7a01a"
"Cart.Manufacturer" "Óscar Toledo G., Thomas Jentzsch, Nathan Strum"
"Cart.Manufacturer" "Oscar Toledo G., Thomas Jentzsch, Nathan Strum"
"Cart.Name" "Aardvark (2019) (PAL60)"
"Cart.Rarity" "Homebrew"
"Display.Phosphor" "YES"
@ -11446,7 +11446,7 @@
""
"Cart.MD5" "82ee056af81203af58092ff2e6cf079d"
"Cart.Manufacturer" "Óscar Toledo G., Thomas Jentzsch, Nathan Strum"
"Cart.Manufacturer" "Oscar Toledo G., Thomas Jentzsch, Nathan Strum"
"Cart.Name" "Aardvark (2019) (NTSC)"
"Cart.Rarity" "Homebrew"
"Display.Phosphor" "YES"

View File

@ -36,6 +36,7 @@
#include "Vec.hxx"
#include "TIA.hxx"
#include "MediaFactory.hxx"
/*
* TODO list
@ -183,13 +184,8 @@ const string Dialog::getHelpURL()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Dialog::openHelp()
{
if(hasHelp())
{
if(SDL_OpenURL(getHelpURL().c_str()))
{
cerr << "error opening URL " << getHelpURL() << endl;
}
}
if(hasHelp() && !MediaFactory::openURL(getHelpURL()))
cerr << "error opening URL " << getHelpURL() << endl;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -