VIDEO: Fix video capable simulator builds on platforms which don't have libSDL available at all by enabling stub code
This commit is contained in:
parent
d4720d3540
commit
a7d0b0e3f3
2 changed files with 7 additions and 16 deletions
13
sim_video.c
13
sim_video.c
|
@ -27,8 +27,6 @@
|
||||||
11-Jun-2013 MB First version
|
11-Jun-2013 MB First version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(USE_SIM_VIDEO)
|
|
||||||
|
|
||||||
#include "sim_video.h"
|
#include "sim_video.h"
|
||||||
|
|
||||||
t_bool vid_active = FALSE;
|
t_bool vid_active = FALSE;
|
||||||
|
@ -39,6 +37,9 @@ int32 vid_cursor_y;
|
||||||
t_bool vid_mouse_b1 = FALSE;
|
t_bool vid_mouse_b1 = FALSE;
|
||||||
t_bool vid_mouse_b2 = FALSE;
|
t_bool vid_mouse_b2 = FALSE;
|
||||||
t_bool vid_mouse_b3 = FALSE;
|
t_bool vid_mouse_b3 = FALSE;
|
||||||
|
|
||||||
|
#if defined(USE_SIM_VIDEO)
|
||||||
|
|
||||||
char vid_release_key[64] = "Ctrl-Right-Shift";
|
char vid_release_key[64] = "Ctrl-Right-Shift";
|
||||||
|
|
||||||
t_stat vid_show (FILE* st, DEVICE *dptr, UNIT* uptr, int32 val, char* desc)
|
t_stat vid_show (FILE* st, DEVICE *dptr, UNIT* uptr, int32 val, char* desc)
|
||||||
|
@ -1818,8 +1819,9 @@ while (_show_stat == -1)
|
||||||
return _show_stat;
|
return _show_stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !defined(HAVE_LIBSDL) */
|
#endif /* defined(HAVE_LIBSDL) */
|
||||||
|
|
||||||
|
#else /* !defined(USE_SIM_VIDEO) */
|
||||||
/* Non-implemented versions */
|
/* Non-implemented versions */
|
||||||
|
|
||||||
uint32 vid_mono_palette[2]; /* Monochrome Color Map */
|
uint32 vid_mono_palette[2]; /* Monochrome Color Map */
|
||||||
|
@ -1885,9 +1887,4 @@ t_stat vid_show_video (FILE* st, UNIT* uptr, int32 val, void* desc)
|
||||||
fprintf (st, "video support unavailable");
|
fprintf (st, "video support unavailable");
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined(HAVE_LIBSDL) */
|
|
||||||
|
|
||||||
#else /* !defined(USE_SIM_VIDEO) */
|
|
||||||
static const char *dummy_declaration = "Something to compile";
|
|
||||||
#endif /* defined(USE_SIM_VIDEO) */
|
#endif /* defined(USE_SIM_VIDEO) */
|
||||||
|
|
10
sim_video.h
10
sim_video.h
|
@ -27,12 +27,8 @@
|
||||||
11-Jun-2013 MB First version
|
11-Jun-2013 MB First version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SIM_VIDEO_H_
|
#ifndef SIM_VIDEO_H_
|
||||||
#define _SIM_VIDEO_H_ 0
|
#define SIM_VIDEO_H_ 0
|
||||||
|
|
||||||
#if !defined(USE_SIM_VIDEO)
|
|
||||||
#error This simulator MUST be compiled with USE_SIM_VIDEO defined
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include "sim_defs.h"
|
#include "sim_defs.h"
|
||||||
|
|
||||||
|
@ -206,6 +202,4 @@ void vid_set_cursor_position (int32 x, int32 y); /* cursor position (set
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#endif /* HAVE_LIBSDL */
|
#endif /* HAVE_LIBSDL */
|
||||||
|
|
||||||
#endif /* USE_SIM_VIDEO */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue