Implemented DX_Fill()

This commit is contained in:
Dimitris Panokostas 2020-07-11 16:02:16 +02:00
parent d13b9571f8
commit 424707aaa8
3 changed files with 18 additions and 5 deletions

View file

@ -1115,6 +1115,20 @@ bool show_screen_maybe(const bool show)
return false;
}
void DX_Fill(int dstx, int dsty, int width, int height, uae_u32 color)
{
SDL_Rect dstrect;
if (width < 0)
width = screen->w;
if (height < 0)
height = screen->h;
dstrect.x = dstx;
dstrect.y = dsty;
dstrect.w = width;
dstrect.h = height;
SDL_FillRect(screen, &dstrect, color);
}
void black_screen_now()
{
#ifndef USE_DISPMANX

View file

@ -37,3 +37,4 @@ extern SDL_Rect renderQuad;
extern bool can_have_linedouble;
extern void check_error_sdl(bool check, const char* message);
extern void toggle_fullscreen();
extern void DX_Fill(int dstx, int dsty, int width, int height, uae_u32 color);

View file

@ -35,6 +35,8 @@
#include <stdlib.h>
#include "amiberry_gfx.h"
#if defined(PICASSO96)
#define WINCURSOR 1
@ -939,11 +941,7 @@ void picasso_refresh()
// Let's put a black-border around the case where we've got a sub-screen...
if (!state->BigAssBitmap) {
if (state->XOffset || state->YOffset)
#ifdef AMIBERRY
write_log("DX_FILL..\n");
#else
DX_Fill(mon, 0, 0, state->Width, state->Height, 0);
#endif
DX_Fill(0, 0, state->Width, state->Height, 0);
}
} else {
width = state->Width;