Skip to content

Commit 5faf35e

Browse files
committed
added ShiVa, and a working directory bug patch
1 parent b95ad3e commit 5faf35e

4 files changed

Lines changed: 46 additions & 0 deletions

File tree

FlashpointSecurePlayer/FlashpointSecurePlayer.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,23 @@ private async void FlashpointSecurePlayer_Load(object sender, EventArgs e) {
513513
return;
514514
}
515515

516+
try {
517+
try {
518+
Directory.SetCurrentDirectory(Application.StartupPath);
519+
} catch (System.Security.SecurityException) {
520+
throw new TaskRequiresElevationException();
521+
} catch {
522+
// Fail silently.
523+
}
524+
} catch (TaskRequiresElevationException) {
525+
try {
526+
AskLaunchInAdministratorMode();
527+
} catch (InvalidModificationException) {
528+
Application.Exit();
529+
return;
530+
}
531+
}
532+
516533
ShowOutput(Properties.Resources.RequiredComponentsAreUnloading);
517534

518535
string arg = null;
@@ -568,6 +585,7 @@ private async void FlashpointSecurePlayer_Shown(object sender, EventArgs e) {
568585
try {
569586
await StartSecurePlayback().ConfigureAwait(false);
570587
} catch (InvalidModificationException) {
588+
// no need to exit here, error shown in interface
571589
//Application.Exit();
572590
return;
573591
} catch (InvalidCurationException) {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<section name="flashpointSecurePlayer" type="FlashpointSecurePlayer.Shared+FlashpointSecurePlayerSection, FlashpointSecurePlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
5+
</configSections>
6+
7+
<flashpointSecurePlayer>
8+
<modifications>
9+
<modification name="shiva3d">
10+
<modeTemplates>
11+
<softwareModeTemplate hideWindow="true">
12+
<regexes>
13+
<regex name="http://" replace="http://localhost:22500/" />
14+
<regex name="(.+)" replace="ShiVa3D\S3DEngine.exe --fullscreen=0 $1" />
15+
</regexes>
16+
</softwareModeTemplate>
17+
</modeTemplates>
18+
<environmentVariables>
19+
<environmentVariable name="__COMPAT_LAYER" value="HIGHDPIAWARE" />
20+
</environmentVariables>
21+
</modification>
22+
</modifications>
23+
</flashpointSecurePlayer>
24+
<startup>
25+
26+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup>
27+
</configuration>

FlashpointSecurePlayer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ You may notice that because the Flashpoint Secure Player is effectively capable
341341
- startBasilisk_compat.bat
342342
- startGroove.bat
343343
- startJava.bat
344+
- startShiVa.bat
344345
- startUnity.bat
345346
- unityRestoreRegistry.bat
346347
- elevate.exe
-7.12 KB
Loading

0 commit comments

Comments
 (0)