Hi,<br><br>For the past week, I've been working on porting Dolphin (the gamecube emulator)<br>to run as a wayland client. I am pleased to announce the code is now in a working<br>state. There are a few issues but fairly minor, considering this is a threaded<br>
EGL/GLSL application that works as an X client or a Wayland client. The same<br>binary can be run in X or Weston, selectable at runtime.<br><br>Since dolphin is a threaded application, timing is critical.<br>I suspect this is related to the bug I ran into, outlined here<br>
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=60942">https://bugs.freedesktop.org/show_bug.cgi?id=60942</a><br>For now, the wayland mainloop seems to be relatively stable using roundtrips and<br>usleep. Hopefully I can track down what's going on there so it can dispatch as intended.<br>
<br>This is quite possibly the first real world application to run as a threaded<br>wayland-egl client. It is also possibly the first standalone client to support<br>X and Wayland platforms simultaneously.<br><br><br>Following is a summary of the current status of the Wayland client features:<br>
<br>What works:<br><br>Build time configuration switches for X and Wayland support<br>Run time platform switch configurable with environment variable<br><br>Core Functionality:<br>Video output<br>Audio output<br>Keyboard input<br>
Joystick input<br><br>UI Functionality:<br>Toggle Fullscreen<br>Pause/Resume Emulation<br>Save/Load State<br>Screenshot<br>Esc to Exit<br><br><br>What doesn't work:<br><br>Mouse input<br>Resizing the window<br><br><br>
<br>More Information:<br><br>Keys:<br><br>Exit:                   Esc<br>Toggle Fullscreen:      'f' or Alt+Enter<br>Pause:                  'p'<br>Save State:             Shift+F1-8<br>Load State:             F1-8<br>
<br><br>Testing:<br><br>1) Dolphin has high system requirements for cpu and gpu. It is recommended to first<br>   install Dolphin from the official channels configured with wxWidgets frontend in X.<br>   This will let you get familiarized and see if it works at all with your system.<br>
<br>2) Grab the code from <a href="https://github.com/soreau/dolphin-emu">https://github.com/soreau/dolphin-emu</a> wayland-egl branch and build it.<br><br>prefix=$HOME/wayland<br><br>export PKG_CONFIG_PATH=$prefix/lib/pkgconfig<br>
<br><br>git checkout git://<a href="http://github.com/soreau/dolphin-emu.git">github.com/soreau/dolphin-emu.git</a> -b wayland-egl<br>cd dolphin-emu<br>mkdir build<br>cd build<br><br>cmake ..                \<br>    -DCMAKE_INSTALL_PREFIX=$prefix    \<br>
    -DCMAKE_PREFIX_PATH=$prefix    \<br>    -DUSE_EGL=1 -DDISABLE_WX=1    \<br>    -DUSE_X11=1 -DUSE_WAYLAND=1    \<br>    -DCMAKE_BUILD_TYPE=Debug    \<br>    -DCMAKE_VERBOSE_MAKEFILE=0    \<br><br>make<br>make install<br>
<br>3) Run it:<br><br>LD_LIBRARY_PATH=$prefix/lib $prefix/bin/dolphin-emu-nogui -e /path/to/gcm<br><br><br>Notes:<br><br>The platform may be selected by setting the environment variable DOLPHIN_EGL_PLATFORM to "x11" or "wayland".<br>
If this environment variable is not set, it will attempt to select an appropriate platform automatically.<br>Gamepad devices with force feedback capabilities work when Dolphin is built against SDL2.<br>Resizing shouldn't be too difficult to implement.<br>
This is a first attempt and WIP so the code isn't perfect and there may be some bugs.<br><br>Issues:<br><br>Dolphin seems to produce invalid image files for screenshots, though weston screenshooter works fine even when in fullscreen.<br>
The emulator segfaults on exit in wayland, after a hack to work around stalling on exit.<br>There is a bug in mesa with GLSL using UBO's that affects Sandybridge. It causes relatively minor rendering artifacts and does not inhibit performance.<br>
<br>Video Clip:<br><br><a href="http://www.youtube.com/watch?v=3ZdXu1VM_VQ&feature=youtu.be">http://www.youtube.com/watch?v=3ZdXu1VM_VQ&feature=youtu.be</a><br><br>