compile fixes

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5099 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2017-05-10 03:13:18 +00:00
parent f449b0eb88
commit 1f729f4afd
4 changed files with 9 additions and 5 deletions

View File

@ -1093,7 +1093,7 @@ rendererinfo_t *rendererinfo[] =
#endif #endif
#ifdef VKQUAKE #ifdef VKQUAKE
&vkrendererinfo, &vkrendererinfo,
#ifdef _WIN32 #if defined(_WIN32) && defined(GLQUAKE)
&nvvkrendererinfo, &nvvkrendererinfo,
#endif #endif
#endif #endif

View File

@ -800,7 +800,7 @@ qboolean D3D9_VID_ApplyGammaRamps (unsigned int gammarampsize, unsigned short *
IDirect3DDevice9_SetGammaRamp(pD3DDev9, 0, D3DSGR_NO_CALIBRATION, (D3DGAMMARAMP *)ramps); IDirect3DDevice9_SetGammaRamp(pD3DDev9, 0, D3DSGR_NO_CALIBRATION, (D3DGAMMARAMP *)ramps);
return true; return true;
} }
static char *(D3D9_VID_GetRGBInfo) (int *truevidwidth, int *truevidheight, enum uploadfmt *fmt) static char *(D3D9_VID_GetRGBInfo) (int *bytestride, int *truevidwidth, int *truevidheight, enum uploadfmt *fmt)
{ {
IDirect3DSurface9 *backbuf, *surf; IDirect3DSurface9 *backbuf, *surf;
D3DLOCKED_RECT rect; D3DLOCKED_RECT rect;
@ -845,7 +845,7 @@ static char *(D3D9_VID_GetRGBInfo) (int *truevidwidth, int *truevidheight, enu
} }
p += rect.Pitch; p += rect.Pitch;
} }
*bytestride = desc.Width*3;
*truevidwidth = desc.Width; *truevidwidth = desc.Width;
*truevidheight = desc.Height; *truevidheight = desc.Height;
} }

View File

@ -1108,7 +1108,7 @@ static qboolean D3D11_VID_ApplyGammaRamps(unsigned int gammarampsize, unsigned s
} }
return false; return false;
} }
static char *D3D11_VID_GetRGBInfo(int *truevidwidth, int *truevidheight, enum uploadfmt *fmt) static char *D3D11_VID_GetRGBInfo(int *bytestride, int *truevidwidth, int *truevidheight, enum uploadfmt *fmt)
{ {
//don't directly map the frontbuffer, as that can hold other things. //don't directly map the frontbuffer, as that can hold other things.
//create a texture, copy the (gpu)backbuffer to that (cpu)texture //create a texture, copy the (gpu)backbuffer to that (cpu)texture
@ -1153,6 +1153,7 @@ static char *D3D11_VID_GetRGBInfo(int *truevidwidth, int *truevidheight, enum up
ID3D11DeviceContext_Unmap(d3ddevctx, (ID3D11Resource*)texture, 0); ID3D11DeviceContext_Unmap(d3ddevctx, (ID3D11Resource*)texture, 0);
} }
ID3D11Texture2D_Release(texture); ID3D11Texture2D_Release(texture);
*bytestride = vid.pixelwidth*3;
*truevidwidth = vid.pixelwidth; *truevidwidth = vid.pixelwidth;
*truevidheight = vid.pixelheight; *truevidheight = vid.pixelheight;
*fmt = TF_RGB24; *fmt = TF_RGB24;

View File

@ -1704,7 +1704,9 @@ static void VID_UpdateWindowStatus (HWND hWnd)
switch(platform_rendermode) switch(platform_rendermode)
{ {
#ifdef VKQUAKE #ifdef VKQUAKE
#ifdef USE_WGL
case MODE_NVVULKAN: case MODE_NVVULKAN:
#endif
case MODE_VULKAN: case MODE_VULKAN:
if (vid.pixelwidth != window_width || vid.pixelheight != window_height) if (vid.pixelwidth != window_width || vid.pixelheight != window_height)
vk.neednewswapchain = true; vk.neednewswapchain = true;
@ -3227,7 +3229,7 @@ rendererinfo_t vkrendererinfo =
#ifdef USE_WGL
static qboolean NVVKVID_Init (rendererstate_t *info, unsigned char *palette) static qboolean NVVKVID_Init (rendererstate_t *info, unsigned char *palette)
{ {
return Win32VID_Init(info, palette, MODE_NVVULKAN); return Win32VID_Init(info, palette, MODE_NVVULKAN);
@ -3288,5 +3290,6 @@ rendererinfo_t nvvkrendererinfo =
"no more" "no more"
}; };
#endif #endif
#endif
#endif #endif