aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-05-07 08:53:51 +1200
committerArslaan Pathan <[email protected]>2026-05-07 08:53:51 +1200
commit04be60da025135501010de0f50a08ff8f60e3cd5 (patch)
treeac5467eafe27506ecdc40c076e68b1b9556555aa /tests
parente6a1e69bea00fc808ae71709abc4e6a4b8f33b3b (diff)
downloadsaffronwebkit-04be60da025135501010de0f50a08ff8f60e3cd5.tar.xz
saffronwebkit-04be60da025135501010de0f50a08ff8f60e3cd5.zip
Make it work on Wayland
IT RUNSSSSSSSSSSSSSSS!!! FUCK WAYLAND that was so shit to do, im switching to XLibre
Diffstat (limited to 'tests')
-rw-r--r--tests/sfwk-minimal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/sfwk-minimal.c b/tests/sfwk-minimal.c
index afac3a2..4a92730 100644
--- a/tests/sfwk-minimal.c
+++ b/tests/sfwk-minimal.c
@@ -1,4 +1,5 @@
#include "glib.h"
+#include <SDL3/SDL_hints.h>
#include <saffron.h>
#include <saffronwebkit.h>
@@ -15,6 +16,9 @@ void btn_callback(SaffronButton* btn) {
}
int main() {
+ SDL_SetHint(SDL_HINT_GPU_DRIVER, "opengles2");
+ SDL_SetHint(SDL_HINT_VIDEO_FORCE_EGL, "true");
+
saffron_init();
const char* driver = SDL_GetCurrentVideoDriver();
@@ -29,7 +33,7 @@ int main() {
ctx = sfwk_init();
if (!ctx) return 1;
- SFWKWebView* webview = sfwk_webview_new(ctx, "https://arslaancodes.com", 900, 600);
+ webview = sfwk_webview_new(ctx, "https://arslaancodes.com", 900, 600);
saffron_widget_add_child(window->root, (SaffronWidget*)button);
saffron_widget_add_child(window->root, (SaffronWidget*)webview);