diff options
Diffstat (limited to 'src/platform/platform.h')
| -rw-r--r-- | src/platform/platform.h | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/src/platform/platform.h b/src/platform/platform.h index 4b31ac3..26f11a5 100644 --- a/src/platform/platform.h +++ b/src/platform/platform.h @@ -9,39 +9,14 @@ // WebGPU specific headers and shims #if defined(STRIP_EXTERNAL_LIBS) #include "stub_types.h" - -#elif defined(DEMO_CROSS_COMPILE_WIN32) +#else +#if defined(DEMO_CROSS_COMPILE_WIN32) #include <webgpu/webgpu.h> #include <webgpu/wgpu.h> - -static inline WGPUStringView str_view(const char* str) { - if (!str) - return {nullptr, 0}; - return {str, strlen(str)}; -} - -static inline WGPUStringView label_view(const char* str) { -#if !defined(STRIP_ALL) - if (!str) - return {nullptr, 0}; - return {str, strlen(str)}; -#else - (void)str; - return {nullptr, 0}; -#endif -} - -static inline void platform_wgpu_wait_any(WGPUInstance instance) { - wgpuInstanceWaitAny(instance, 0, nullptr, 0); -} -static inline void -platform_wgpu_set_error_callback(WGPUDevice device, - WGPUUncapturedErrorCallback callback) { -} - #else #include <webgpu.h> #include <wgpu.h> +#endif static inline WGPUStringView str_view(const char* str) { if (!str) @@ -63,12 +38,6 @@ static inline WGPUStringView label_view(const char* str) { static inline void platform_wgpu_wait_any(WGPUInstance instance) { wgpuInstanceWaitAny(instance, 0, nullptr, 0); } -static inline void -platform_wgpu_set_error_callback(WGPUDevice device, - WGPUUncapturedErrorCallback callback) { - // Handled in descriptor for new API, but provided for compatibility if needed - // elsewhere -} #endif // Forward declare GLFWwindow to avoid including the full header here. @@ -85,7 +54,6 @@ struct PlatformState { int windowed_x = 0, windowed_y = 0, windowed_w = 0, windowed_h = 0; }; -// Refactored platform API PlatformState platform_init(bool fullscreen, int width, int height); void platform_shutdown(PlatformState* state); void platform_poll(PlatformState* state); |
