summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-10-21 12:56:07 +0300
committerkartofen <mladenovnasko0@gmail.com>2023-10-21 12:56:07 +0300
commitff2497dc2c67d2b7df29b729c763b6e09c876d76 (patch)
treea83f5dcb96066e700da914d222732aad1ed1c5f7 /src/window.c
parent5115eb592d1477b355770eee9d6b913481d4859f (diff)
minor changes and more error checks
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index 4a498e6..9810a42 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3,11 +3,15 @@
window_t window_create(struct window_info *info)
{
- info->flags |= SDL_WINDOW_SHOWN | SDL_WINDOW_VULKAN;
+ info->flags |= SDL_WINDOW_VULKAN;
SDL_Vulkan_LoadLibrary(NULL);
window_t window = SDL_CreateWindow(info->title, info->x, info->y,
info->w, info->h, info->flags);
+ if(window == NULL) {
+ err("SDL_CreateWindow: failed");
+ }
+
return window;
}
@@ -20,6 +24,7 @@ void window_destroy(window_t window)
int window_extension_info(window_t window, unsigned int *ext_count, const char **extensions)
{
if(SDL_Vulkan_GetInstanceExtensions((SDL_Window *)window, ext_count, extensions) == SDL_FALSE) {
+ err("SDL_Vulkan_GetInstanceExtensions: failed");
return 1;
}
@@ -29,6 +34,7 @@ int window_extension_info(window_t window, unsigned int *ext_count, const char *
int window_create_surface(window_t window, VkInstance instance, VkSurfaceKHR *surface)
{
if(SDL_Vulkan_CreateSurface((SDL_Window *)window, instance, surface) == SDL_FALSE) {
+ err("SDL_Vulkan_CreateSurface: failed");
return 1;
}