mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-10 23:29:43 +00:00
More common video code
* Provide new function to get current common framebuffer * Migrates non-X11 video_setpage routine
This commit is contained in:
parent
52b087f805
commit
209eb86051
@ -97,8 +97,8 @@ void video_loadfont_int(int first, int qty, const unsigned char *data);
|
||||
*/
|
||||
void video_plotchar(int row, int col, int color, unsigned char code);
|
||||
|
||||
/* Called at about 30Hz (this may change in future), and when waiting in
|
||||
* the interface screens.
|
||||
/*
|
||||
* Draws video and possibly handles keyboard input.
|
||||
*
|
||||
* Should flush any video data to the real screen (if any kind of caching
|
||||
* is in use), check for keyboard input (presently reported via
|
||||
@ -108,6 +108,11 @@ void video_sync(int block);
|
||||
|
||||
void video_set_mode(a2_video_mode_t mode);
|
||||
|
||||
/*
|
||||
* Get a reference to current internal framebuffer
|
||||
*/
|
||||
const uint8_t * const video_current_framebuffer();
|
||||
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
/**** Private stuff follows *****/
|
||||
|
@ -67,14 +67,6 @@ typedef struct {
|
||||
unsigned long status;
|
||||
} FullScreenHints;
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
video_setpage(p): Switch to screen page p
|
||||
------------------------------------------------------------------------- */
|
||||
void video_setpage(int p)
|
||||
{
|
||||
video__current_page = p;
|
||||
}
|
||||
|
||||
#ifdef HAVE_X11_SHM
|
||||
/*
|
||||
* XShm code influenced from the DOOM source code.
|
||||
|
12
src/vidsup.c
12
src/vidsup.c
@ -724,3 +724,15 @@ void video_shutdown(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
video_setpage(p): Switch to screen page p
|
||||
------------------------------------------------------------------------- */
|
||||
void video_setpage(int p)
|
||||
{
|
||||
video__current_page = p;
|
||||
}
|
||||
|
||||
const uint8_t * const video_current_framebuffer() {
|
||||
return !video__current_page ? video__fb1 : video__fb2;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user