Changed all the renderers' init functions to correctly call cgapal_rebuild() instead of manually rebuilding the CGA palette array.

This commit is contained in:
OBattler
2017-12-12 19:18:12 +01:00
parent 83f7d458db
commit 0d7ece0daf
3 changed files with 8 additions and 7 deletions

View File

@@ -362,12 +362,10 @@ d3d_init(HWND h)
{
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;
cgapal_rebuild();
d3d = Direct3DCreate9(D3D_SDK_VERSION);
memset(&d3dpp, 0, sizeof(d3dpp));
@@ -405,13 +403,12 @@ d3d_init_fs(HWND h)
WCHAR title[200];
int c;
cgapal_rebuild();
d3d_w = GetSystemMetrics(SM_CXSCREEN);
d3d_h = GetSystemMetrics(SM_CYSCREEN);
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 */
_swprintf(title, L"%s v%s", EMU_NAME_W, EMU_VERSION_W);

View File

@@ -389,6 +389,8 @@ ddraw_take_screenshot(wchar_t *fn)
int
ddraw_init(HWND h)
{
cgapal_rebuild();
if (FAILED(DirectDrawCreate(NULL, &lpdd, NULL))) return(0);
if (FAILED(lpdd->QueryInterface(IID_IDirectDraw7, (LPVOID *)&lpdd7)))