Skip to content

Commit

Permalink
More fiddlin'
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Jun 8, 2024
1 parent 921e284 commit 2cd261e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
4 changes: 4 additions & 0 deletions source_files/obsidian_main/m_addons.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ void VFS_ScanForPresets() {
}
}

PHYSFS_freeList(got_names);

if (all_presets.size() == 0) {
LogPrintf("DONE (none found)\n");
} else {
Expand Down Expand Up @@ -229,6 +231,8 @@ void VFS_ScanForAddons() {
}
}

PHYSFS_freeList(got_names);

if (all_addons.size() == 0) {
LogPrintf("DONE (none found)\n");
} else {
Expand Down
10 changes: 0 additions & 10 deletions source_files/obsidian_main/m_lua.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,6 @@ static bool scan_dir_process_name(const std::string &name,
return false; /* NOT REACHED */
}

struct scan_dir_nocase_CMP {
inline bool operator()(std::string_view A, std::string_view B) const {
return StringCompare(A, B) < 0;
}
};

// LUA: scan_directory(dir, match) --> list
//
// Note: 'match' parameter must be of the form "*" or "*.xxx"
Expand Down Expand Up @@ -385,10 +379,6 @@ int gui_scan_directory(lua_State *L) {

PHYSFS_freeList(got_names);

// sort into alphabetical order [ Note: not unicode aware ]

std::sort(list.begin(), list.end(), scan_dir_nocase_CMP());

// create the list of filenames / dirnames

lua_newtable(L);
Expand Down
1 change: 1 addition & 0 deletions source_files/obsidian_main/m_lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifndef __SCRIPTING_HEADER__
#define __SCRIPTING_HEADER__

#include <stdint.h>
#include <string>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion source_files/obsidian_main/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void Determine_WorkingPath() {
#ifdef _WIN32
home_dir = PHYSFS_getBaseDir();
#else
home_dir = PHYSFS_getUserDir();
home_dir = PHYSFS_getPrefDir(NULL, "Obsidian Level Maker");
#endif
}

Expand Down
1 change: 1 addition & 0 deletions source_files/obsidian_main/sys_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
//
//------------------------------------------------------------------------

#include <ctime>
#include <fstream>
#include <iostream>
#include "headers.h"
Expand Down

0 comments on commit 2cd261e

Please sign in to comment.