QRetro is a libretro API frontend implemented within a Qt QWindow. It supports multi-instancing, allowing multiple instances of libretro cores to run simultaneously.
To use QRetro in your project, use one of the following options:
If you wish to statically compile QRetro into your project, clone this repo and include the .pri file in your qmake project:
include(QRetro/QRetro.pri)If you wish to instead link against a QRetro binary, build QRetro using the .pro file instead. Pre-built binaries are not yet available.
To instantiate a QRetro object, set it up, and display it:
#include <QRetro.h>
auto retro = new QRetro();
retro->loadCore("C:/core_libretro.dll");
retro->loadContent("C:/content.bin");
retro->startCore();
retro->show();QRetro can be wrapped in a QWidget for display in a Qt UI layout like so:
auto retrowidget = QWidget::createWindowContainer(retro);
retrowidget->show();If you plan to use hardware-accelerated cores using OpenGL, include the following line before initializing your QApplication:
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);See the following wiki pages for information on QRetro's compatibility with specific libretro cores and features:
- https://github.com/classicslive/QRetro/wiki/Cores
- https://github.com/classicslive/QRetro/wiki/Environment-callbacks
QRetro requires the following Qt modules:
coreguimultimedia
The following modules and libraries are optional, and can be disabled by including the associated CONFIG define in your qmake project:
| Dependency | Configuration Flag |
|---|---|
| QCamera / Qt multimedia module | QRETRO_CONFIG_NO_CAMERA |
| Qt gamepad module | QRETRO_CONFIG_NO_GAMEPAD |
| Qt positioning module | QRETRO_CONFIG_NO_LOCATION |
| QMidi submodule | QRETRO_CONFIG_NO_MIDI |
| Qt multimedia module | QRETRO_CONFIG_NO_MULTIMEDIA |
| Qt opengl module / OpenGL libraries | QRETRO_CONFIG_NO_OPENGL |
| Qt sensors module | QRETRO_CONFIG_NO_SENSORS |
| Qt Mobility systeminfo module | QRETRO_CONFIG_NO_SYSTEMINFO |
CONFIG += QRETRO_CONFIG_NO_LOCATION
include(QRetro/QRetro.pri)QRetro is licensed under the MIT License.