Fix *nix SDL builds
This commit is contained in:
@@ -643,12 +643,15 @@ ui_msgbox_header(int flags, void *header, void *message)
|
||||
SDL_MessageBoxData msgdata;
|
||||
SDL_MessageBoxButtonData msgbtn;
|
||||
|
||||
#if 0
|
||||
if (!header)
|
||||
header = (void *) (flags & MBX_ANSI) ? "86Box" : L"86Box";
|
||||
#endif
|
||||
if (header <= (void *) 7168)
|
||||
header = (void *) plat_get_string((int) header);
|
||||
header = (void *) plat_get_string((uintptr_t) header);
|
||||
if (message <= (void *) 7168)
|
||||
message = (void *) plat_get_string((int) message);
|
||||
message = (void *) plat_get_string((uintptr_t) message);
|
||||
|
||||
msgbtn.buttonid = 1;
|
||||
msgbtn.text = "OK";
|
||||
msgbtn.flags = 0;
|
||||
@@ -914,7 +917,7 @@ monitor_thread(void *param)
|
||||
line = f_readline("(86Box) ");
|
||||
else {
|
||||
printf("(86Box) ");
|
||||
getline(&line, &n, stdin);
|
||||
!getline(&line, &n, stdin);
|
||||
}
|
||||
if (line) {
|
||||
int cmdargc = 0;
|
||||
|
@@ -51,7 +51,7 @@ int title_set = 0;
|
||||
int resize_pending = 0;
|
||||
int resize_w = 0;
|
||||
int resize_h = 0;
|
||||
static uint8_t interpixels[17842176];
|
||||
static void *pixeldata;
|
||||
|
||||
extern void RenderImGui(void);
|
||||
static void
|
||||
@@ -150,11 +150,15 @@ sdl_blit_shim(int x, int y, int w, int h, int monitor_index)
|
||||
params.y = y;
|
||||
params.w = w;
|
||||
params.h = h;
|
||||
|
||||
if (!(!sdl_enabled || (x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL) || (sdl_render == NULL) || (sdl_tex == NULL)) || (monitor_index >= 1))
|
||||
video_copy(interpixels, &(buffer32->line[y][x]), h * 2048 * sizeof(uint32_t));
|
||||
if (screenshots)
|
||||
video_screenshot(interpixels, 0, 0, 2048);
|
||||
for (int row = 0; row < h; ++row)
|
||||
video_copy(&(((uint8_t *) pixeldata)[row * 2048 * sizeof(uint32_t)]), &(buffer32->line[y + row][x]), w * sizeof(uint32_t));
|
||||
|
||||
if (monitors[monitor_index].mon_screenshots)
|
||||
video_screenshot((uint32_t *) pixeldata, 0, 0, 2048);
|
||||
blitreq = 1;
|
||||
|
||||
video_blit_complete_monitor(monitor_index);
|
||||
}
|
||||
|
||||
@@ -214,7 +218,7 @@ sdl_blit(int x, int y, int w, int h)
|
||||
r_src.y = y;
|
||||
r_src.w = w;
|
||||
r_src.h = h;
|
||||
SDL_UpdateTexture(sdl_tex, &r_src, interpixels, 2048 * 4);
|
||||
SDL_UpdateTexture(sdl_tex, &r_src, pixeldata, 2048 * 4);
|
||||
blitreq = 0;
|
||||
|
||||
sdl_real_blit(&r_src);
|
||||
@@ -271,8 +275,6 @@ sdl_close(void)
|
||||
sdl_flags = -1;
|
||||
}
|
||||
|
||||
static int old_capture = 0;
|
||||
|
||||
void
|
||||
sdl_enable(int enable)
|
||||
{
|
||||
@@ -393,7 +395,6 @@ plat_vidapi(char *api)
|
||||
static int
|
||||
sdl_init_common(int flags)
|
||||
{
|
||||
wchar_t temp[128];
|
||||
SDL_version ver;
|
||||
|
||||
/* Get and log the version of the DLL we are using. */
|
||||
|
Reference in New Issue
Block a user