Skip to content

Commit 06e751e

Browse files
committed
dmddevice ini lookup
1 parent 1766dd3 commit 06e751e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- **Table Data Manager**: Fixed missing update of the highscore filename and alternative ROM name fields when cycling through different tables.
1111
- **In-Game Recorder**: Fixed multiple issues causing in-game recordings to fail.
1212
- **System Manager**: The release selection for the backglass server, FlexDMD, Freezy and VPinMAME are filled with all releases now. This allows you to downgrade your installation too in case there are issues with the latest releases.
13+
- **DMD Device**: Added missing **dmddevice.ini** lookup using the environment variable **DMDDEVICE_CONFIG**, set by the freezy installer.
1314

1415
---
1516

vpin-studio-server/src/main/java/de/mephisto/vpin/server/dmd/DMDDeviceIniService.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ public DMDBackupData getBackupData(Game game) {
268268

269269

270270
public String getStoreName(Game game) {
271-
String storeName = StringUtils.defaultString(game.getRomAlias(), game.getRom());;
271+
String storeName = StringUtils.defaultString(game.getRomAlias(), game.getRom());
272+
;
272273
if (DMDPackageTypes.UltraDMD.equals(game.getDMDType())) {
273274
storeName = FilenameUtils.getBaseName(game.getGameFileName());
274275
// cf https://github.com/vbousquet/flexdmd/blob/6357c1874e896777a53348094eafa86f386dd8fe/FlexDMD/FlexDMD.cs#L188
@@ -339,6 +340,15 @@ public void restore(Game game, DMDBackupData dmdBackupData) {
339340

340341
private void loadDmdDeviceIni(@NonNull GameEmulator gameEmulator) {
341342
File iniFile = new File(gameEmulator.getMameFolder(), DMD_DEVICE_INI);
343+
344+
String dmddeviceConfig = System.getenv("DMDDEVICE_CONFIG");
345+
if (!StringUtils.isEmpty(dmddeviceConfig)) {
346+
File altIniFile = new File(dmddeviceConfig);
347+
if (altIniFile.exists()) {
348+
iniFile = altIniFile;
349+
}
350+
}
351+
342352
if (!iniFile.exists()) {
343353
LOG.error("No {} file found.", DMD_DEVICE_INI);
344354
return;

0 commit comments

Comments
 (0)