mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-20 11:29:01 +00:00
add rootless as video mode instead of own setting
This commit is contained in:
parent
cd70c9925e
commit
f6616d1d4d
@ -32,9 +32,6 @@
|
|||||||
prefs_desc platform_prefs_items[] = {
|
prefs_desc platform_prefs_items[] = {
|
||||||
{"idlewait", TYPE_BOOLEAN, false, "sleep when idle"},
|
{"idlewait", TYPE_BOOLEAN, false, "sleep when idle"},
|
||||||
{"sdlrender", TYPE_STRING, false, "SDL_Renderer driver (\"auto\", \"software\" (may be faster), etc.)"},
|
{"sdlrender", TYPE_STRING, false, "SDL_Renderer driver (\"auto\", \"software\" (may be faster), etc.)"},
|
||||||
#ifdef VIDEO_ROOTLESS
|
|
||||||
{"rootless", TYPE_BOOLEAN, false, "Rootles mode (System 7)"},
|
|
||||||
#endif
|
|
||||||
{NULL, TYPE_END, false} // End of list
|
{NULL, TYPE_END, false} // End of list
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ static uint32 low_mem_map = 0;
|
|||||||
int16 InstallRootlessProc() {
|
int16 InstallRootlessProc() {
|
||||||
// Rootless mode support
|
// Rootless mode support
|
||||||
M68kRegisters r;
|
M68kRegisters r;
|
||||||
if (PrefsFindBool("rootless")) {
|
if (strncmp(PrefsFindString("screen"), "rootless", 8) == 0) {
|
||||||
printf("Installing rootless support\n");
|
printf("Installing rootless support\n");
|
||||||
r.d[0] = sizeof(rootless_proc);
|
r.d[0] = sizeof(rootless_proc);
|
||||||
Execute68kTrap(0xa71e, &r); // NewPtrSysClear()
|
Execute68kTrap(0xa71e, &r); // NewPtrSysClear()
|
||||||
|
@ -88,7 +88,8 @@ extern int display_type; // See enum above
|
|||||||
#else
|
#else
|
||||||
enum {
|
enum {
|
||||||
DISPLAY_WINDOW, // windowed display
|
DISPLAY_WINDOW, // windowed display
|
||||||
DISPLAY_SCREEN // fullscreen display
|
DISPLAY_SCREEN, // fullscreen display
|
||||||
|
DISPLAY_ROOTLESS // fullscreen with transparent desktop
|
||||||
};
|
};
|
||||||
static int display_type = DISPLAY_WINDOW; // See enum above
|
static int display_type = DISPLAY_WINDOW; // See enum above
|
||||||
#endif
|
#endif
|
||||||
@ -743,6 +744,11 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags
|
|||||||
window_flags |= SDL_WINDOW_RESIZABLE;
|
window_flags |= SDL_WINDOW_RESIZABLE;
|
||||||
*/
|
*/
|
||||||
if (!sdl_window) {
|
if (!sdl_window) {
|
||||||
|
#ifdef VIDEO_ROOTLESS
|
||||||
|
if (display_type == DISPLAY_ROOTLESS) {
|
||||||
|
window_flags |= SDL_WINDOW_BORDERLESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
sdl_window = SDL_CreateWindow(
|
sdl_window = SDL_CreateWindow(
|
||||||
"Basilisk II",
|
"Basilisk II",
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
@ -1380,6 +1386,13 @@ bool VideoInit(bool classic)
|
|||||||
display_type = DISPLAY_WINDOW;
|
display_type = DISPLAY_WINDOW;
|
||||||
else if (sscanf(mode_str, "dga/%d/%d", &default_width, &default_height) == 2)
|
else if (sscanf(mode_str, "dga/%d/%d", &default_width, &default_height) == 2)
|
||||||
display_type = DISPLAY_SCREEN;
|
display_type = DISPLAY_SCREEN;
|
||||||
|
#ifdef VIDEO_ROOTLESS
|
||||||
|
else if (strncmp(mode_str, "rootless", 8) == 0) {
|
||||||
|
display_type = DISPLAY_ROOTLESS;
|
||||||
|
default_width = sdl_display_width();
|
||||||
|
default_height = sdl_display_height();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (default_width <= 0)
|
if (default_width <= 0)
|
||||||
default_width = sdl_display_width();
|
default_width = sdl_display_width();
|
||||||
@ -1469,7 +1482,12 @@ bool VideoInit(bool classic)
|
|||||||
for (int d = VIDEO_DEPTH_1BIT; d <= default_depth; d++)
|
for (int d = VIDEO_DEPTH_1BIT; d <= default_depth; d++)
|
||||||
add_mode(display_type, w, h, video_modes[i].resolution_id, TrivialBytesPerRow(w, (video_depth)d), d);
|
add_mode(display_type, w, h, video_modes[i].resolution_id, TrivialBytesPerRow(w, (video_depth)d), d);
|
||||||
}
|
}
|
||||||
}
|
#ifdef VIDEO_ROOTLESS
|
||||||
|
} else if (display_type == DISPLAY_ROOTLESS) {
|
||||||
|
for (int d = VIDEO_DEPTH_1BIT; d <= default_depth; d++)
|
||||||
|
add_mode(display_type, default_width, default_height, 0x80, TrivialBytesPerRow(default_width, (video_depth)d), d);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (VideoModes.empty()) {
|
if (VideoModes.empty()) {
|
||||||
ErrorAlert(STR_NO_XVISUAL_ERR);
|
ErrorAlert(STR_NO_XVISUAL_ERR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user