Skip to content

Commit

Permalink
Fenster suddenly broke...
Browse files Browse the repository at this point in the history
  • Loading branch information
jbikker committed Jan 3, 2025
1 parent 781b30c commit f5544b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ enable_testing()
add_executable(tiny_bvh_minimal tiny_bvh_minimal.cpp)
add_executable(tiny_bvh_renderer tiny_bvh_renderer.cpp)
add_executable(tiny_bvh_speedtest tiny_bvh_speedtest.cpp)
if (NOT EMSCRIPTEN)
# EMSCRIPTEN doesn't render anything by default (you would need WebGL/WebGPU)
if (NOT EMSCRIPTEN) # EMSCRIPTEN doesn't render anything by default (you would need WebGL/WebGPU)
if (NOT UNIX) # For some reason, X11 suddenly broke on Github.
add_executable(tiny_bvh_fenster tiny_bvh_fenster.cpp)
endif()
endif()

target_include_directories(tiny_bvh_speedtest PRIVATE ${CMAKE_CURRENT_LIST_DIR}/external/OpenCL/inc)

Expand Down Expand Up @@ -133,7 +134,7 @@ if (NOT MSVC)
elseif (APPLE)
target_link_libraries(tiny_bvh_fenster ${COCOA_LIBRARY})
elseif (X11_FOUND)
target_link_libraries(tiny_bvh_fenster -lX11)
target_link_libraries(tiny_bvh_fenster ${X11_LIBRARIES})
endif()
endif()
else()
Expand Down
4 changes: 1 addition & 3 deletions external/fenster.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <windows.h>
#else
#define _DEFAULT_SOURCE 1
// #include <X11/XKBlib.h>
#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <time.h>
Expand Down Expand Up @@ -316,7 +316,6 @@ FENSTER_API int fenster_loop(struct fenster *f) {
case MotionNotify:
f->x = ev.xmotion.x, f->y = ev.xmotion.y;
break;
#if 0 // suddenly broken...
case KeyPress:
case KeyRelease: {
int m = ev.xkey.state;
Expand All @@ -330,7 +329,6 @@ FENSTER_API int fenster_loop(struct fenster *f) {
f->mod = (!!(m & ControlMask)) | (!!(m & ShiftMask) << 1) |
(!!(m & Mod1Mask) << 2) | (!!(m & Mod4Mask) << 3);
} break;
#endif
}
}
return 0;
Expand Down

0 comments on commit f5544b0

Please sign in to comment.