This page is dedicated to discuss the design of the retro-gtk and retro-gobject libraries.

retro-gobject

Lack of User Data in Libretro

The Libretro API doesn't allow to pass any identifiers or user chosen data to the functions that it would return when calling back, this is annoying when we don't want to limit the user to only one RetroCore instance at a time.

Solution

Pros

Cons

Comment

Fix the Libretro API

It is clean and avoid workarounds

IT requires influence in the Libretro community

This is the best long term solution

Store the calling RetroCore in a global variable

Quite simple to implement

Doesn't work when the core calls back from a different thread

This is the currently implemented workaround

Have n instances of the callbacks

Quite simple to implement

Creates code duplication, allow to have only n cores at a time

Run the cores in their own process

Should solve the problem, makes the application resilient to a crashing core

Complex to implement, probably slow because of IPC, may cause problems for OpenGL

Design/Playground/Games/RetroGtk (last edited 2016-12-06 12:32:29 by AdrienPlazas)