Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
Windows selects a runtime based on the registry, not a fixed path.
  • Loading branch information
Ralith authored and daveh-lunarg committed Jun 14, 2019
1 parent 833fb65 commit 88493a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
27 changes: 0 additions & 27 deletions src/common/platform_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,33 +126,6 @@ static inline void PlatformUtilsFreeEnv(char *val) {
}
}

// Prefix for the Windows global runtime JSON file name
static const std::string rt_file_folder = "\\ProgramData\\Khronos\\OpenXR\\";
static const std::string rt_file_prefix = "\\openxr_runtime_";

static inline bool PlatformGetGlobalRuntimeFileName(uint16_t major_version, std::string &file_name) {
bool ret_value = false;
try {
char *sys_drive = PlatformUtilsGetSecureEnv("SystemDrive");
if (nullptr != sys_drive) {
file_name = sys_drive;
PlatformUtilsFreeEnv(sys_drive);
file_name += rt_file_folder;
if (sizeof(void *) == 8) {
file_name += "64";
} else {
file_name += "32";
}
file_name += rt_file_prefix;
file_name += std::to_string(major_version);
file_name += ".json";
ret_value = true;
}
} catch (...) {
}
return ret_value;
}

#else // Not Linux or Windows

static inline char *PlatformUtilsGetEnv(const char *name) {
Expand Down
1 change: 0 additions & 1 deletion src/loader/manifest_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ static void AddFilesInPath(ManifestFileType type, const std::string &search_path
// This works around issue if multiple path separator follow each other directly.
last_found = found;
while (found == last_found) {
std::ostringstream stringStream2;
last_found = found + 1;
found = search_path.find_first_of(PATH_SEPARATOR, last_found);
}
Expand Down

0 comments on commit 88493a4

Please sign in to comment.