Closed ghost closed 5 years ago
OK, probably due to these two lines https://github.com/libretro/ludo/blob/master/video/video.go#L135-L136
Instead of taking the first mode, we should keep the current mode:
diff --git a/video/video.go b/video/video.go
index 758925a..9bddb05 100644
--- a/video/video.go
+++ b/video/video.go
@@ -132,8 +132,7 @@ func (video *Video) Configure(fullscreen bool) {
if fullscreen {
m = glfw.GetMonitors()[settings.Settings.VideoMonitorIndex]
- vms := m.GetVideoModes()
- vm := vms[len(vms)-1]
+ vm := m.GetVideoMode()
width = vm.Width
height = vm.Height
} else {
But changing these two lines causes a bug on OSX retina...
Thanks for the answer at least I now know what causes this bug maybe there is a solution to both problems
Did you take a look here for a retina example https://github.com/glfw/glfw/issues/698#issuecomment-178828904
Yep, I was using glfwGetFramebufferSize, but the wrong way.
Can you check if this PR fixes the problem for you please?
It does fix something for me on OSX.
I tried
go get -u github.com/libreto/ludo
and now I get the follwing error prevoisly I followed the install instructions in the readme and all needed packages are installed.
Were there any updates made to the Joystcik input on Linux? Since this seems to be a different issue will close this one.
noby@mars:~$ go get -u github.com/libretro/ludo
# github.com/go-gl/glfw/v3.2/glfw
In file included from go/src/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go:24:0:
go/src/github.com/go-gl/glfw/v3.2/glfw/glfw/src/linux_joystick.c: In function ‘_glfwInitJoysticksLinux’:
go/src/github.com/go-gl/glfw/v3.2/glfw/glfw/src/linux_joystick.c:224:42: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 9 [-Wformat-truncation=]
snprintf(path, sizeof(path), "%s/%s", dirname, entry->d_name);
^~~~~~~
In file included from /usr/include/stdio.h:862:0,
from /usr/include/X11/Xcursor/Xcursor.h:26,
from go/src/github.com/go-gl/glfw/v3.2/glfw/glfw/src/x11_platform.h:39,
from go/src/github.com/go-gl/glfw/v3.2/glfw/glfw/src/internal.h:169,
from go/src/github.com/go-gl/glfw/v3.2/glfw/glfw/src/x11_init.c:28,
from go/src/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go:19:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 12 and 267 bytes into a destination of size 20
@nfuhs I've never encounter this error before, and I can't reproduce it.
If I set fullscreen on Ubuntu 18.04 Bionic I only get a wrong resolution of 1280x720