Skip to content

Commit

Permalink
sokol_app.h emsc: surround WebGPU specific struct with ifdef SOKOL_WGPU
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Jun 29, 2020
1 parent ac06062 commit ca61dc2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,8 @@ typedef struct {

/*== EMSCRIPTEN DECLARATIONS =================================================*/
#if defined(_SAPP_EMSCRIPTEN)

#if defined(SOKOL_WGPU)
typedef struct {
int state;
WGPUDevice device;
Expand All @@ -1258,6 +1260,7 @@ typedef struct {
WGPUTextureView msaa_view;
WGPUTextureView depth_stencil_view;
} _sapp_wgpu_t;
#endif

typedef struct {
bool textfield_created;
Expand Down Expand Up @@ -4876,7 +4879,7 @@ _SOKOL_PRIVATE void _sapp_win32_destroy_window(void) {
}

_SOKOL_PRIVATE void _sapp_win32_init_dpi(void) {

typedef BOOL(WINAPI * SETPROCESSDPIAWARE_T)(void);
typedef HRESULT(WINAPI * SETPROCESSDPIAWARENESS_T)(PROCESS_DPI_AWARENESS);
typedef HRESULT(WINAPI * GETDPIFORMONITOR_T)(HMONITOR, MONITOR_DPI_TYPE, UINT*, UINT*);
Expand Down Expand Up @@ -7555,7 +7558,7 @@ SOKOL_API_IMPL int sapp_run(const sapp_desc* desc) {
#elif defined(_SAPP_LINUX)
_sapp_linux_run(desc);
#else
// calling sapp_run() directly is not supported on Android)
// calling sapp_run() directly is not supported on Android)
_sapp_fail("sapp_run() not supported on this platform!");
#endif
return 0;
Expand Down

0 comments on commit ca61dc2

Please sign in to comment.