aboutsummaryrefslogtreecommitdiff
path: root/loader/loader_platform.h
diff options
context:
space:
mode:
authorJon Ashburn <jon@lunarg.com>2015-06-30 14:46:22 -0700
committerJon Ashburn <jon@lunarg.com>2015-07-01 10:29:45 -0600
commit7ddece584fbfde91655486701fbf24afc9082e55 (patch)
tree4ecc0bd6c4797d391eba5993aa644c2daf5af264 /loader/loader_platform.h
parentf2c5c984f32b658ec3fc647c7393c9d5007efa2a (diff)
downloadusermoji-7ddece584fbfde91655486701fbf24afc9082e55.tar.xz
loader: Support gettting JSON ICD manifest files from registry
Windows now supports the JSON manifest file for ICDs
Diffstat (limited to 'loader/loader_platform.h')
-rw-r--r--loader/loader_platform.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/loader/loader_platform.h b/loader/loader_platform.h
index b0bd2d51..a7bd0c64 100644
--- a/loader/loader_platform.h
+++ b/loader/loader_platform.h
@@ -161,6 +161,8 @@ static inline void loader_platform_thread_cond_broadcast(loader_platform_thread_
#include <windows.h>
#include <assert.h>
#include <stdio.h>
+#include <io.h>
+#include <stdbool.h>
#ifdef __cplusplus
#include <iostream>
#include <string>
@@ -170,7 +172,8 @@ using namespace std;
// VK Library Filenames, Paths, etc.:
#define PATH_SEPERATOR ';'
#define DIRECTORY_SYMBOL '\\'
-#define DEFAULT_VK_DRIVERS_INFO "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers"
+#define DEFAULT_VK_REGISTRY_HIVE HKEY_LOCAL_MACHINE
+#define DEFAULT_VK_DRIVERS_INFO "SOFTWARE\\Khronos\\Vulkan\\Drivers"
// TODO: Are these the correct paths
#define DEFAULT_VK_DRIVERS_PATH "C:\\Windows\\System32;C:\\Windows\\SysWow64"
// TODO/TBD: Is this an appropriate prefix for Windows?
@@ -222,9 +225,9 @@ static char *basename(char *pathname)
}
// File IO
-static inline bool loader_platform_file_exists(const char *path)
+static bool loader_platform_file_exists(const char *path)
{
- if (_access(path, 0))
+ if ((_access(path, 0)) == -1)
return false;
else
return true;