Skip to content

Commit ed288cc

Browse files
authored
Merge pull request #71 from oblivioncth/dev
Merge to master for v0.8.2
2 parents 4ef8f49 + 78232e0 commit ed288cc

File tree

10 files changed

+38
-8
lines changed

10 files changed

+38
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24.0...3.30.0)
66
# Project
77
# NOTE: DON'T USE TRAILING ZEROS IN VERSIONS
88
project(FIL
9-
VERSION 0.8.1
9+
VERSION 0.8.2
1010
LANGUAGES CXX
1111
DESCRIPTION "Flashpoint Importer for Launchers"
1212
)

app/src/import/details.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
/* Although somewhat redundant with settings.h, this is a collection of
55
* Import related info that is specifically collected to be shared with
6-
* Installs
6+
* Installs or other faculties that don't get passed the details
7+
* directly.
78
*/
89

910
// Project Includes
@@ -20,6 +21,7 @@ struct Details
2021
QString clifpPath;
2122
QList<QString> involvedPlatforms;
2223
QList<QString> involvedPlaylists;
24+
bool forceFullscreen; // TODO: This doesn't quite fit here as installs don't need to know this directly
2325

2426
static Details current();
2527

app/src/import/settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ struct OptionSet
4444
PlaylistGameMode playlistMode;
4545
Fp::Db::InclusionOptions inclusionOptions;
4646
bool excludeAddApps;
47+
bool forceFullscreen;
4748
};
4849

4950
class ImagePaths

app/src/import/worker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,8 @@ Worker::Result Worker::doImport(Qx::Error& errorReport)
526526
.imageMode = mOptionSet.imageMode,
527527
.clifpPath = CLIFp::standardCLIFpPath(*mFlashpointInstall),
528528
.involvedPlatforms = involvedPlatforms,
529-
.involvedPlaylists = mImportSelections.playlists
529+
.involvedPlaylists = mImportSelections.playlists,
530+
.forceFullscreen = mOptionSet.forceFullscreen
530531
};
531532
Details::setCurrent(details);
532533

app/src/kernel/clifp.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
// Project Includes
1313
#include "project_vars.h"
14+
#include "import/details.h"
1415

1516
//===============================================================================================================
1617
// CLIFp
@@ -95,5 +96,13 @@ QString CLIFp::parametersFromStandard(QStringView originalAppPath, QStringView o
9596
return clifpParam;
9697
}
9798

98-
QString CLIFp::parametersFromStandard(const QUuid& titleId) { return u"-q "_s + PLAY_COMMAND + ' ' + ID_ARG.arg(titleId.toString(QUuid::WithoutBraces)); }
99-
QString CLIFp::parametersFromStandard(const QString& titleId) { return u"-q "_s + PLAY_COMMAND + ' ' + ID_ARG.arg(titleId); }
99+
QString CLIFp::parametersFromStandard(const QUuid& titleId) { return parametersFromStandard(titleId.toString(QUuid::WithoutBraces)); }
100+
101+
QString CLIFp::parametersFromStandard(const QString& titleId)
102+
{
103+
QString params = u"-q "_s + PLAY_COMMAND + ' ' + ID_ARG.arg(titleId);
104+
auto impDet = Import::Details::current();
105+
if(impDet.forceFullscreen)
106+
params += ' ' + FULLSCREEN_SWITCH;
107+
return params;
108+
}

app/src/kernel/clifp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class CLIFp
2828
static inline const QString PARAM_ARG = uR"(--param="%1")"_s;
2929
static inline const QString MSG_ARG = uR"(--msg="%1")"_s;
3030
static inline const QString EXTRA_ARG = uR"(--extra="%1")"_s;
31+
static inline const QString FULLSCREEN_SWITCH = uR"(--fullscreen)"_s;
3132

3233
static inline const QString ERR_FP_CANT_DEPLOY_CLIFP = u"Failed to deploy "_s + EXE_NAME + u" to the selected Flashpoint install.\n"_s
3334
"\n"

app/src/launcher/implementation/attractmode/am-install.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Qx::Error Install::postImport()
353353
// General emulator setup
354354
QString workingDir = QDir::toNativeSeparators(QFileInfo(Import::Details::current().clifpPath).absolutePath());
355355
emulatorConfig->setExecutable(CLIFp::EXE_NAME);
356-
emulatorConfig->setArgs(uR"(play -i u"[romfilename]"_s)"_s);
356+
emulatorConfig->setArgs(CLIFp::parametersFromStandard(u"[romfilename]"_s));
357357
emulatorConfig->setWorkDir(workingDir);
358358
emulatorConfig->setRomPath(u""_s);
359359
emulatorConfig->setRomExt(u""_s);

app/src/ui/mainwindow.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ bool MainWindow::getExcludeAddApps() const
387387
return ui->action_excludeAdditionalApps->isChecked();
388388
}
389389

390+
bool MainWindow::getForceFullscreen() const
391+
{
392+
return ui->action_forceFullscreen->isChecked();
393+
}
394+
390395
void MainWindow::prepareImport()
391396
{
392397
// Gather selection's and notify controller
@@ -398,7 +403,8 @@ void MainWindow::prepareImport()
398403
getForceDownloadImages(),
399404
getSelectedPlaylistGameMode(),
400405
getSelectedInclusionOptions(),
401-
getExcludeAddApps()
406+
getExcludeAddApps(),
407+
getForceFullscreen()
402408
};
403409

404410
emit importTriggered(impSel, optSet, selectionsMayModify());

app/src/ui/mainwindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ class MainWindow : public QMainWindow
180180
Import::ImageMode getSelectedImageMode() const;
181181
bool getForceDownloadImages() const;
182182
bool getExcludeAddApps() const;
183+
bool getForceFullscreen() const;
183184

184185
// Import
185186
void prepareImport();

app/src/ui/mainwindow.ui

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@
956956
<addaction name="action_forceDownloadImages"/>
957957
<addaction name="action_includeAnimations"/>
958958
<addaction name="action_excludeAdditionalApps"/>
959+
<addaction name="action_forceFullscreen"/>
959960
<addaction name="separator"/>
960961
<addaction name="action_deployCLIFp"/>
961962
</widget>
@@ -1082,6 +1083,14 @@
10821083
<string>Exclude Additional Apps</string>
10831084
</property>
10841085
</action>
1086+
<action name="action_forceFullscreen">
1087+
<property name="checkable">
1088+
<bool>true</bool>
1089+
</property>
1090+
<property name="text">
1091+
<string>Force Fullscreen (If Supported)</string>
1092+
</property>
1093+
</action>
10851094
</widget>
10861095
<resources>
10871096
<include location="../../res/resources.qrc"/>
@@ -1404,7 +1413,7 @@
14041413
</slots>
14051414
<buttongroups>
14061415
<buttongroup name="buttonGroup_playlistGameMode"/>
1407-
<buttongroup name="buttonGroup_updateMode"/>
14081416
<buttongroup name="buttonGroup_imageMode"/>
1417+
<buttongroup name="buttonGroup_updateMode"/>
14091418
</buttongroups>
14101419
</ui>

0 commit comments

Comments
 (0)