Skip to content

ControlPortAPI ​

cpp
#include <VAmiga.h>
cpp
class ControlPortAPI

Defined in VAmiga.h:1840

API of a control port.

Public Attributes ​

ReturnNameDescription
JoystickAPIjoystickThe joystick connected to the port.
MouseAPImouseThe mouse connected to the port.

joystick ​

cpp
JoystickAPI joystick

Type: JoystickAPI

Defined in VAmiga.h:1849

The joystick connected to the port.


mouse ​

cpp
MouseAPI mouse

Type: MouseAPI

Defined in VAmiga.h:1851

The mouse connected to the port.

Public Methods ​

ReturnNameDescription
const ControlPortInfo &getInfo constReturns the component's current state.
const ControlPortInfo &getCachedInfo constReturns the most recent state snapshot recorded by the emulator thread (see getInfo()).

getInfo ​

const

cpp
const ControlPortInfo & getInfo() const

Defined in VAmiga.h:1862

Returns the component's current state.

getInfo() reads the live state on the calling thread. The result is only consistent if the emulator is paused or suspended. getCachedInfo() returns the snapshot the emulator thread has recorded most recently, which is the one to use while the emulator runs. Both return references that can be overwritten by a later call or by the emulator thread, so copy the data if you need to keep it.


getCachedInfo ​

const

cpp
const ControlPortInfo & getCachedInfo() const

Defined in VAmiga.h:1864

Returns the most recent state snapshot recorded by the emulator thread (see getInfo()).