Closed athairus closed 8 years ago
Currently have the entire pipeline set up and working except for input. It currently only has GamepadManager
up and running and LibretroCore
ORs all input together into player 1.
There is a bug with PhoenixWindow
I need to look into at some point. Toggling VSync creates this lovely picture:
See my default Windows 10 wallpaper behind it? This must have something to do with how we reset the context to apply the new VSync setting... or a driver bug? (NVIDIA GTX 770, 364.72)
EDIT: Doesn't matter now, better less hacky VSync method is being used now
Some Qt stuff we should try out:
Q_GLOBAL_STATIC
GameConsole
simplerWhat if we had Nodes
register themselves with GameConsole
instead of GameConsole
owning a set of Nodes
? We could then have each Node, in its constructor, call something like this:
GameConsole::RegisterNode( Node *node, bool gameConsoleOwnsPointer );
. If gameConsoleOwnsPointer
is true, it'll get moved to the game thread and will be deleted by GameConsole
on app quit. This should be set to false when the object is owned by QML.
Maybe we can take advantage of Qt's meta object system to resolve what type of Node
this is at runtime and store it into the appropriate member of GameConsole
. Maybe we could take it one step further and have GameConsole
track Node
pointers by a QMap<QString, Node *> nodes
, using a macro like #define connectNodes( a, b ) Node::connectNodes( nodes[ #a ], nodes[ #b ] )
or something, renaming Node::connectNodes
to something else to prevent collisions. A program-terminating null check will be added to make sure things are being referenced properly.
Then to add a new Node
you simply:
Node
subclassGameConsole::registerNode( this, true/false );
in your Node
subclass constructorGameConsole
for your dynamic pipeline typeGameConsole
or the QML engineThis will also get rid of the pointer properties within GameConsole
. The objects will instead make themselves known to GameConsole
by calling that function from their constructor.
GameConsole
itself will have to be set up earlier than the QML engine for this to work for QML objects. We can simply declare it in main()
and make it available to the entire QML engine with the name gameConsole
.
node.h
) and instantiated in GameConsole
, the root of the tree.QObject
subclass with a pair of signal/slot pairs for handling two types of data: Commands and DataQVariant
as data if necessary (if it's not necessary, an invalid QVariant
is passed). Examples: Play, Stop, Pause, AddControllerQMutex
to ensure atomic reads and writes to the data and a circular buffer pool for the producer of that data.GlobalGamepad
so the gamepad can be used to control Phoenix.Core
subclass and Nodes to connect it to the dynamic pipeline.ControlOutput
.SDLUnloader
). The head is SDLManager
. For the most part, it should overlap with the critical segment. By itself, it's not required to be single-threaded.Basic render loop breaks QML Timers and I don't know why...
This PR is for an implementation of the pipeline tree I had envisioned earlier. All nodes in the tree will communicate through a simple and clearly defined interface.
The PR is a package deal: work is being done here in
feature-pipeline
and also in phoenix-backend under the same name,feature-pipeline
.TODO:
StackView
Emulator
needs touch mode258
AudioOutput
MicroTimer
's fault?VideoOutput
/LibretroCore
PhoenixWindow