diff --git a/raylib/core.c b/raylib/core.c index 173b219..01febd6 100644 --- a/raylib/core.c +++ b/raylib/core.c @@ -716,7 +716,7 @@ int GetScreenHeight(void) void ShowCursor() { #if defined(PLATFORM_DESKTOP) - #if defined(__linux__) + #if defined(__linux__) && defined(_GLFW_X11) XUndefineCursor(glfwGetX11Display(), glfwGetX11Window(window)); #else glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL); @@ -729,7 +729,7 @@ void ShowCursor() void HideCursor() { #if defined(PLATFORM_DESKTOP) - #if defined(__linux__) + #if defined(__linux__) && defined(_GLFW_X11) XColor col; const char nil[] = {0}; diff --git a/raylib/platform_wayland.go b/raylib/platform_wayland.go deleted file mode 100644 index 0582daf..0000000 --- a/raylib/platform_wayland.go +++ /dev/null @@ -1,93 +0,0 @@ -// +build wayland - -package raylib - -/* -#include "raylib.h" -#include -*/ -import "C" - -import ( - "os" - "unsafe" -) - -// InitWindow - Initialize Window and OpenGL Graphics -func InitWindow(width int32, height int32, t interface{}) { - cwidth := (C.int)(width) - cheight := (C.int)(height) - - title, ok := t.(string) - if ok { - ctitle := C.CString(title) - cptitle := unsafe.Pointer(ctitle) - defer C.free(cptitle) - C.InitWindow(cwidth, cheight, cptitle) - } -} - -// SetCallbackFunc - Sets callback function -func SetCallbackFunc(func(unsafe.Pointer)) { - return -} - -// ShowCursor - Shows cursor -func ShowCursor() { - return -} - -// HideCursor - Hides cursor -func HideCursor() { - return -} - -// IsCursorHidden - Returns true if cursor is not visible -func IsCursorHidden() bool { - return false -} - -// EnableCursor - Enables cursor -func EnableCursor() { - C.EnableCursor() -} - -// DisableCursor - Disables cursor -func DisableCursor() { - C.DisableCursor() -} - -// IsFileDropped - Check if a file have been dropped into window -func IsFileDropped() bool { - ret := C.IsFileDropped() - v := bool(int(ret) == 1) - return v -} - -// GetDroppedFiles - Retrieve dropped files into window -func GetDroppedFiles(count *int32) []string { - ccount := (*C.int)(unsafe.Pointer(count)) - ret := C.GetDroppedFiles(ccount) - - tmpslice := (*[1 << 24]*C.char)(unsafe.Pointer(ret))[:*count:*count] - gostrings := make([]string, *count) - for i, s := range tmpslice { - gostrings[i] = C.GoString(s) - } - - return gostrings -} - -// ClearDroppedFiles - Clear dropped files paths buffer -func ClearDroppedFiles() { - C.ClearDroppedFiles() -} - -// OpenAsset - Open asset -func OpenAsset(name string) (Asset, error) { - f, err := os.Open(name) - if err != nil { - return nil, err - } - return f, nil -}