mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 15:34:18 +08:00
145 lines
5.2 KiB
Diff
145 lines
5.2 KiB
Diff
diff --color -ruwN source/meson.build source-new/meson.build
|
|
--- source/meson.build 2023-03-22 19:13:43.000000000 +0700
|
|
+++ source-new/meson.build 2026-06-12 05:37:17.049652059 +0700
|
|
@@ -39,7 +39,7 @@
|
|
dep_m = cc.find_library('m', required : false)
|
|
dep_winmm = cc.find_library('winmm', required : false)
|
|
|
|
-dep_gl = dependency('gl')
|
|
+dep_gl = dependency('gl', required: false)
|
|
|
|
dep_epoll = dependency('epoll-shim', required : false)
|
|
dep_gles1 = dependency('glesv1_cm', required : get_option('gles1'))
|
|
@@ -99,7 +99,7 @@
|
|
endif
|
|
|
|
dep_glx = dependency('glx', required: false, disabler : true)
|
|
-if not dep_glx.found() and host_machine.system() == 'darwin'
|
|
+if not dep_glx.found()
|
|
# xquartz doesn't have a glx.pc, but it does have the header. And all the
|
|
# symbols reside in libGL, so let's just use that.
|
|
if cc.check_header('GL/glx.h', dependencies: dep_x11)
|
|
diff --color -ruwN source/src/egl/eglut/eglut_wayland.c source-new/src/egl/eglut/eglut_wayland.c
|
|
--- source/src/egl/eglut/eglut_wayland.c 2023-03-22 19:13:43.000000000 +0700
|
|
+++ source-new/src/egl/eglut/eglut_wayland.c 2026-06-12 06:13:45.751910615 +0700
|
|
@@ -7,7 +7,7 @@
|
|
#include <string.h>
|
|
#include <stdbool.h>
|
|
#include <sys/mman.h>
|
|
-#include <sys/timerfd.h>
|
|
+// #include <sys/timerfd.h>
|
|
#include <unistd.h>
|
|
#include <xkbcommon/xkbcommon.h>
|
|
|
|
@@ -133,21 +133,6 @@
|
|
handle_key(struct display *d, xkb_keycode_t keycode,
|
|
enum wl_keyboard_key_state state)
|
|
{
|
|
- struct itimerspec timer = {0};
|
|
- if (d->seat.rate != 0 &&
|
|
- xkb_keymap_key_repeats(d->seat.xkb_keymap, keycode) &&
|
|
- state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
|
- d->seat.repeat_keycode = keycode;
|
|
- if (d->seat.rate > 1)
|
|
- timer.it_interval.tv_nsec = 1000000000 / d->seat.rate;
|
|
- else
|
|
- timer.it_interval.tv_sec = 1;
|
|
-
|
|
- timer.it_value.tv_sec = d->seat.delay / 1000;
|
|
- timer.it_value.tv_nsec = ( d->seat.delay % 1000) * 1000000;
|
|
- }
|
|
- timerfd_settime(d->seat.key_repeat_fd, 0, &timer, NULL);
|
|
-
|
|
if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
|
|
emit_keypress(d, keycode);
|
|
}
|
|
@@ -167,9 +152,6 @@
|
|
leave_callback(void *data, struct wl_keyboard *wl_keyboard,
|
|
uint32_t serial, struct wl_surface *surface)
|
|
{
|
|
- struct display *d = data;
|
|
- struct itimerspec timer = {0};
|
|
- timerfd_settime(d->seat.key_repeat_fd, 0, &timer, NULL);
|
|
}
|
|
|
|
static void
|
|
@@ -218,7 +200,7 @@
|
|
if (caps & WL_SEAT_CAPABILITY_KEYBOARD) {
|
|
d->seat.keyboard = wl_seat_get_keyboard(seat);
|
|
wl_keyboard_add_listener(d->seat.keyboard, &keyboard_listener, data);
|
|
- d->seat.key_repeat_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
|
|
+ // d->seat.key_repeat_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
|
|
} else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD)) {
|
|
wl_keyboard_destroy(d->seat.keyboard);
|
|
d->seat.keyboard = NULL;
|
|
diff --color -ruwN source/src/egl/opengles2/es2gears.c source-new/src/egl/opengles2/es2gears.c
|
|
--- source/src/egl/opengles2/es2gears.c 2023-03-22 19:13:43.000000000 +0700
|
|
+++ source-new/src/egl/opengles2/es2gears.c 2026-06-12 06:16:40.759435351 +0700
|
|
@@ -155,6 +155,13 @@
|
|
gear->vertices = calloc(gear->nvertices, sizeof(*gear->vertices));
|
|
v = gear->vertices;
|
|
|
|
+#ifndef sincos
|
|
+#define sincos(x, s, c) do { \
|
|
+ *(s) = sin(x); \
|
|
+ *(c) = cos(x); \
|
|
+} while(0)
|
|
+#endif
|
|
+
|
|
for (i = 0; i < teeth; i++) {
|
|
/* Calculate needed sin/cos for varius angles */
|
|
sincos(i * 2.0 * M_PI / teeth, &s[0], &c[0]);
|
|
diff --color -ruwN source/src/vulkan/wsi/wayland.c source-new/src/vulkan/wsi/wayland.c
|
|
--- source/src/vulkan/wsi/wayland.c 2023-03-22 19:13:43.000000000 +0700
|
|
+++ source-new/src/vulkan/wsi/wayland.c 2026-06-12 06:14:03.701669367 +0700
|
|
@@ -35,7 +35,7 @@
|
|
#include <string.h>
|
|
|
|
#include <sys/mman.h>
|
|
-#include <sys/timerfd.h>
|
|
+// #include <sys/timerfd.h>
|
|
#include <unistd.h>
|
|
|
|
#include <wayland-util.h>
|
|
@@ -131,22 +131,12 @@
|
|
handle_key(uint key, enum wl_keyboard_key_state state)
|
|
{
|
|
xkb_keycode_t xkb_key = key + 8;
|
|
- struct itimerspec timer = {0};
|
|
if (keyboard_data.rate != 0 &&
|
|
xkb_keymap_key_repeats(keyboard_data.xkb_keymap, xkb_key) &&
|
|
state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
|
keyboard_data.repeat_scancode = xkb_key;
|
|
- if (keyboard_data.rate > 1) {
|
|
- timer.it_interval.tv_nsec = 1000000000 / keyboard_data.rate;
|
|
- } else {
|
|
- timer.it_interval.tv_sec = 1;
|
|
}
|
|
|
|
- timer.it_value.tv_sec = keyboard_data.delay / 1000;
|
|
- timer.it_value.tv_nsec = (keyboard_data.delay % 1000) * 1000000;
|
|
- }
|
|
- timerfd_settime(keyboard_data.keyboard_timer_fd, 0, &timer, NULL);
|
|
-
|
|
dispatch_key(xkb_key, state);
|
|
}
|
|
|
|
@@ -197,8 +187,6 @@
|
|
leave(void *data, struct wl_keyboard *keyboard, uint serial,
|
|
struct wl_surface *surface)
|
|
{
|
|
- struct itimerspec timer = {0};
|
|
- timerfd_settime(keyboard_data.keyboard_timer_fd, 0, &timer, NULL);
|
|
}
|
|
|
|
static void
|
|
@@ -234,7 +222,7 @@
|
|
wl_registry_destroy(registry);
|
|
|
|
keyboard_data.keyboard = wl_seat_get_keyboard(keyboard_data.seat);
|
|
- keyboard_data.keyboard_timer_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
|
|
+ // keyboard_data.keyboard_timer_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
|
|
|
|
wl_keyboard_add_listener(keyboard_data.keyboard, &keyboard_listener, NULL);
|
|
|