From d5a563ca72f623fc758b6a2efa785e7fd0a98b67 Mon Sep 17 00:00:00 2001 From: dinkc64 Date: Thu, 31 Oct 2024 09:00:43 -0400 Subject: [PATCH] fix compile ish for Mucci --- src/intf/video/win32/vid_directx9.cpp | 32 ++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/intf/video/win32/vid_directx9.cpp b/src/intf/video/win32/vid_directx9.cpp index f4a560505..bf441ec3d 100644 --- a/src/intf/video/win32/vid_directx9.cpp +++ b/src/intf/video/win32/vid_directx9.cpp @@ -628,7 +628,12 @@ int dx9GeometryInit() #endif return 1; } - memcpy(pVertexData, &vScreen, 4 * sizeof(D3DLVERTEX2)); + //memcpy(pVertexData, &vScreen, 4 * sizeof(D3DLVERTEX2)); + pVertexData[0] = vScreen[0]; + pVertexData[1] = vScreen[1]; + pVertexData[2] = vScreen[2]; + pVertexData[3] = vScreen[3]; + pVB[y]->Unlock(); } } @@ -663,7 +668,14 @@ int dx9GeometryInit() return 1; } - memcpy(pVertexData, &vTemp, 4 * sizeof(D3DLVERTEX2)); + // with the memcpy() below, gcc complains about copying a non-trivial type + //memcpy(pVertexData, &vTemp, 4 * sizeof(D3DLVERTEX2)); + // try this instead: + pVertexData[0] = vTemp[0]; + pVertexData[1] = vTemp[1]; + pVertexData[2] = vTemp[2]; + pVertexData[3] = vTemp[3]; + pIntermediateVB->Unlock(); } @@ -1802,15 +1814,15 @@ struct hardfx_config { */ hardfx_config HardFXConfigs[] = { - { "n/a", 0, }, // 0 (note: zero entry is "None") - { "support/shaders/crt_aperture.fx", 0, }, // 1 - { "support/shaders/crt_caligari.fx", 0, }, // 2 - { "support/shaders/crt_cgwg_fast.fx", 0, }, // 3 - { "support/shaders/crt_easymode.fx", 0, }, // 4 - { "support/shaders/crt_standard.fx", 0, }, // 5 - { "support/shaders/crt_bicubic.fx", 0, }, // 6 + { "n/a", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 0 (note: zero entry is "None") + { "support/shaders/crt_aperture.fx", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 1 + { "support/shaders/crt_caligari.fx", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 2 + { "support/shaders/crt_cgwg_fast.fx", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 3 + { "support/shaders/crt_easymode.fx", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 4 + { "support/shaders/crt_standard.fx", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 5 + { "support/shaders/crt_bicubic.fx", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 6 { "support/shaders/crt_retrosl.fx", 1, { 0.0, 0.0, 0.0, 0.0 }, { 0, 0, 0, 0 }, "Animation (0 = disabled)", NULL, NULL, NULL }, // 7 - { "support/shaders/crt_cga.fx", 0, }, // 8 + { "support/shaders/crt_cga.fx", 0, { 0.0, 0.0, 0.0, 0.0 } }, // 8 }; #undef D3DFVF_LVERTEX2