summaryrefslogtreecommitdiffstatshomepage
path: root/plugins
diff options
context:
space:
mode:
author Roberto Benfatto <robenfi@gmail.com>2016-08-04 07:39:32 +0200
committer GitHub <noreply@github.com>2016-08-04 07:39:32 +0200
commit0646ca8b1a62be748b48b16205f02f640b5945a7 (patch)
tree442ee99185e971c37b407fd1761d78b2160103bb /plugins
parent3c47e784195846e647612204b483d9c0e9793634 (diff)
Fix .hi file load and write
hiscore.dat and hi folder path were not resolved as expected (their path was relative to mame executable, not to the plugin folder). Explicitly writing them as absolute paths gives the desired behavior.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hiscore/init.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/hiscore/init.lua b/plugins/hiscore/init.lua
index c4276514f62..21766d52167 100644
--- a/plugins/hiscore/init.lua
+++ b/plugins/hiscore/init.lua
@@ -22,8 +22,8 @@ end
function hiscore.startplugin()
- local hiscoredata_path = "hiscore.dat";
- local hiscore_path = "hi";
+ local hiscoredata_path = hiscore_plugin_path .. "/hiscore.dat";
+ local hiscore_path = hiscore_plugin_path .. "/hi";
local current_checksum = 0;
local default_checksum = 0;
@@ -65,9 +65,6 @@ function hiscore.startplugin()
local function read_hiscore_dat ()
local file = io.open( hiscoredata_path, "r" );
local rm_match;
- if not file then
- file = io.open( hiscore_plugin_path .. "/hiscore.dat", "r" );
- end
if emu.softname() ~= "" then
rm_match = '^' .. emu.romname() .. ',' .. emu.softname() .. ':';
else