internal/ui: bug fix: compile failures with -tags=nintendosdk

This commit is contained in:
Hajime Hoshi 2023-01-03 20:07:49 +09:00
parent 723a44a822
commit 73985c6c96
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ func (e *egl) init(nativeWindowHandle C.NativeWindowType) error {
}
e.surface = C.eglCreateWindowSurface(e.display, config, nativeWindowHandle, nil)
if e.surface == C.EGL_NO_SURFACE {
if e.surface == C.EGLSurface(C.EGL_NO_SURFACE) {
return fmt.Errorf("ui: eglCreateWindowSurface failed")
}
@ -76,8 +76,8 @@ func (e *egl) init(nativeWindowHandle C.NativeWindowType) error {
// For debug callback
C.EGL_CONTEXT_FLAGS_KHR, C.EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR,
C.EGL_NONE}
e.context = C.eglCreateContext(e.display, config, C.EGL_NO_CONTEXT, &contextAttribs[0])
if e.context == C.EGL_NO_CONTEXT {
e.context = C.eglCreateContext(e.display, config, C.EGLContext(C.EGL_NO_CONTEXT), &contextAttribs[0])
if e.context == C.EGLContext(C.EGL_NO_CONTEXT) {
return fmt.Errorf("ui: eglCreateContext failed: error: %d", C.eglGetError())
}

View File

@ -18,7 +18,7 @@
#include "init_nintendosdk.h"
extern "C" NativeWindowType ebitengine_Initialize() {}
extern "C" NativeWindowType ebitengine_Initialize() { return 0; }
extern "C" void ebitengine_InitializeProfiler() {}