mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-09-29 23:54:53 +00:00
support showing hourglass pause animation
This commit is contained in:
parent
eee0dd45e3
commit
142f0181bc
@ -174,6 +174,16 @@ static void _animation_showMessage(char *messageTemplate, unsigned int cols, uns
|
|||||||
pthread_mutex_unlock(&messageMutex);
|
pthread_mutex_unlock(&messageMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void _animation_showPaused(void) {
|
||||||
|
#define PAUSED_ANIMATION_ROWS 1
|
||||||
|
#define PAUSED_ANIMATION_COLS 3
|
||||||
|
static char pausedTemplate[PAUSED_ANIMATION_ROWS][PAUSED_ANIMATION_COLS+1] = {
|
||||||
|
" @ ",
|
||||||
|
};
|
||||||
|
pausedTemplate[0][1] = MOUSETEXT_HOURGLASS;
|
||||||
|
_animation_showMessage(pausedTemplate[0], PAUSED_ANIMATION_COLS, PAUSED_ANIMATION_ROWS);
|
||||||
|
}
|
||||||
|
|
||||||
static void _animation_showCPUSpeed(void) {
|
static void _animation_showCPUSpeed(void) {
|
||||||
|
|
||||||
#define CPU_ANIMATION_ROWS 1
|
#define CPU_ANIMATION_ROWS 1
|
||||||
@ -245,9 +255,10 @@ __attribute__((constructor(CTOR_PRIORITY_LATE)))
|
|||||||
static void _init_glalert(void) {
|
static void _init_glalert(void) {
|
||||||
LOG("Initializing message animation subsystem");
|
LOG("Initializing message animation subsystem");
|
||||||
|
|
||||||
|
video_backend->animation_showMessage = &_animation_showMessage;
|
||||||
|
video_backend->animation_showPaused = &_animation_showPaused;
|
||||||
video_backend->animation_showCPUSpeed = &_animation_showCPUSpeed;
|
video_backend->animation_showCPUSpeed = &_animation_showCPUSpeed;
|
||||||
video_backend->animation_showDiskChosen = &_animation_showDiskChosen;
|
video_backend->animation_showDiskChosen = &_animation_showDiskChosen;
|
||||||
video_backend->animation_showMessage = &_animation_showMessage;
|
|
||||||
|
|
||||||
glnode_registerNode(RENDER_MIDDLE, (GLNode){
|
glnode_registerNode(RENDER_MIDDLE, (GLNode){
|
||||||
.setup = &alert_init,
|
.setup = &alert_init,
|
||||||
|
@ -28,6 +28,7 @@ typedef struct video_backend_s {
|
|||||||
|
|
||||||
// optional functions
|
// optional functions
|
||||||
void (*animation_showMessage)(char *message, unsigned int cols, unsigned int rows);
|
void (*animation_showMessage)(char *message, unsigned int cols, unsigned int rows);
|
||||||
|
void (*animation_showPaused)(void);
|
||||||
void (*animation_showCPUSpeed)(void);
|
void (*animation_showCPUSpeed)(void);
|
||||||
void (*animation_showDiskChosen)(int drive);
|
void (*animation_showDiskChosen)(int drive);
|
||||||
void (*animation_showTrackSector)(int drive, int track, int sect);
|
void (*animation_showTrackSector)(int drive, int track, int sect);
|
||||||
|
Loading…
Reference in New Issue
Block a user