Skip to content

Commit df1b792

Browse files
committed
v2.1
1 parent aeae228 commit df1b792

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

src/app/forms/about.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<Font name="System Regular" size="13"/>
2121
</font>
2222
</LabelEx>
23-
<LabelEx alignment="CENTER" autoSize="false" contentDisplay="LEFT" ellipsisString="..." focusTraversable="false" graphicTextGap="4" id="label3" layoutX="120" layoutY="219" prefHeight="24" prefWidth="96" style="-fx-background-color:#9141ac;-fx-background-radius:50px;" styleClass="label " text="2.0 version" textAlignment="CENTER" textFill="#ffffff" underline="false" wrapText="false">
23+
<LabelEx alignment="CENTER" autoSize="false" contentDisplay="LEFT" ellipsisString="..." focusTraversable="false" graphicTextGap="4" id="label3" layoutX="120" layoutY="219" prefHeight="24" prefWidth="96" style="-fx-background-color:#9141ac;-fx-background-radius:50px;" styleClass="label " text="2.1 version" textAlignment="CENTER" textFill="#ffffff" underline="false" wrapText="false">
2424
<font>
2525
<Font name="System Bold" size="12"/>
2626
</font>

src/app/forms/gameStarting.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class gameStarting extends AbstractForm
1313
*/
1414
function doShow(UXWindowEvent $e = null)
1515
{
16-
$GLOBALS['argv'][1] = 'Gang Beasts';
1716
$process = filesWorker::generateProcess($GLOBALS['argv'][1]) ?? app()->shutdown();
1817
waitAsync('5s',function (){$this->hide();});
1918
new Thread(function () use ($process){filesWorker::run($process,$GLOBALS['argv'][1]);})->start();

src/app/modules/AppModule.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ class AppModule extends AbstractModule
1414
*/
1515
function doAction(ScriptEvent $e = null)
1616
{
17+
if (System::getProperty('prism.forceGPU') != true) #MIGRATION FROM LEGACY, REMOVE IN V2.4
18+
{
19+
$desktops = [str::trim(execute('xdg-user-dir DESKTOP',true)->getInput()->readFully()).'/OnlineFix Linux Launcher.desktop',
20+
System::getProperty('user.home').'/.local/share/applications/OnlineFix Linux Launcher.desktop'];
21+
foreach ($desktops as $desktop)
22+
{
23+
$content = file_get_contents($desktop);
24+
if (fs::isFile($desktop) and str::contains($content,'-Dprism.forceGPU') == false)
25+
file_put_contents($desktop,str::replace($content,'-jar','-Dprism.forceGPU=true -jar'));
26+
}
27+
28+
if (fs::isFile('./jre/bin/java'))
29+
{
30+
new Process(array_merge([fs::abs('./jre/bin/java'),'-Dprism.forceGPU=true','-jar'],$GLOBALS['argv']))->start();
31+
System::halt(0);
32+
}
33+
}
34+
1735
$userhome = System::getProperty('user.home');
1836
$this->games->path = $userhome.'/.config/OFME-Linux/Games.ini';
1937
fs::ensureParent($this->games->path);

0 commit comments

Comments
 (0)