Changed all the renderers' init functions to correctly call cgapal_rebuild() instead of manually rebuilding the CGA palette array.
This commit is contained in:
@@ -182,6 +182,8 @@ vnc_init(UNUSED(void *arg))
|
|||||||
32, 32, 0, 1, 255,255,255, 16, 8, 0, 0, 0
|
32, 32, 0, 1, 255,255,255, 16, 8, 0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cgapal_rebuild();
|
||||||
|
|
||||||
if (rfb == NULL) {
|
if (rfb == NULL) {
|
||||||
wcstombs(title, ui_window_title(NULL), sizeof(title));
|
wcstombs(title, ui_window_title(NULL), sizeof(title));
|
||||||
updatingSize = 0;
|
updatingSize = 0;
|
||||||
|
@@ -362,12 +362,10 @@ d3d_init(HWND h)
|
|||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
for (c = 0; c < 256; c++)
|
|
||||||
pal_lookup[c] = makecol(cgapal[c].r << 2,
|
|
||||||
cgapal[c].g << 2, cgapal[c].b << 2);
|
|
||||||
|
|
||||||
d3d_hwnd = h;
|
d3d_hwnd = h;
|
||||||
|
|
||||||
|
cgapal_rebuild();
|
||||||
|
|
||||||
d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||||
|
|
||||||
memset(&d3dpp, 0, sizeof(d3dpp));
|
memset(&d3dpp, 0, sizeof(d3dpp));
|
||||||
@@ -405,13 +403,12 @@ d3d_init_fs(HWND h)
|
|||||||
WCHAR title[200];
|
WCHAR title[200];
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
|
cgapal_rebuild();
|
||||||
|
|
||||||
d3d_w = GetSystemMetrics(SM_CXSCREEN);
|
d3d_w = GetSystemMetrics(SM_CXSCREEN);
|
||||||
d3d_h = GetSystemMetrics(SM_CYSCREEN);
|
d3d_h = GetSystemMetrics(SM_CYSCREEN);
|
||||||
|
|
||||||
d3d_hwnd = h;
|
d3d_hwnd = h;
|
||||||
for (c = 0; c < 256; c++)
|
|
||||||
pal_lookup[c] = makecol(cgapal[c].r << 2,
|
|
||||||
cgapal[c].g << 2, cgapal[c].b << 2);
|
|
||||||
|
|
||||||
/*FIXME: should be done once, in win.c */
|
/*FIXME: should be done once, in win.c */
|
||||||
_swprintf(title, L"%s v%s", EMU_NAME_W, EMU_VERSION_W);
|
_swprintf(title, L"%s v%s", EMU_NAME_W, EMU_VERSION_W);
|
||||||
|
@@ -389,6 +389,8 @@ ddraw_take_screenshot(wchar_t *fn)
|
|||||||
int
|
int
|
||||||
ddraw_init(HWND h)
|
ddraw_init(HWND h)
|
||||||
{
|
{
|
||||||
|
cgapal_rebuild();
|
||||||
|
|
||||||
if (FAILED(DirectDrawCreate(NULL, &lpdd, NULL))) return(0);
|
if (FAILED(DirectDrawCreate(NULL, &lpdd, NULL))) return(0);
|
||||||
|
|
||||||
if (FAILED(lpdd->QueryInterface(IID_IDirectDraw7, (LPVOID *)&lpdd7)))
|
if (FAILED(lpdd->QueryInterface(IID_IDirectDraw7, (LPVOID *)&lpdd7)))
|
||||||
|
Reference in New Issue
Block a user