- backend fixes from GZDoom.

This commit is contained in:
Christoph Oelckers 2021-04-25 11:28:34 +02:00
parent 3ad4a869c1
commit dca964444b
3 changed files with 8 additions and 2 deletions

View file

@ -460,6 +460,11 @@ int FKeyBindings::GetKeysForCommand (const char *cmd, int *first, int *second)
*first = *second = c = i = 0;
if (cmd[0] == '\0')
{
return 0;
}
while (i < NUM_KEYS && c < 2)
{
if (stricmp (cmd, Binds[i]) == 0)

View file

@ -1534,7 +1534,6 @@ bool FileSystem::CreatePathlessCopy(const char *name, int id, int /*flags*/)
auto oldlump = FileInfo[lump];
int slash = oldlump.longName.LastIndexOf('/');
// Note: already pathless entries must be duplica
if (slash == -1)
{

View file

@ -270,6 +270,8 @@ uint8_t *VkHardwareTexture::MapBuffer()
unsigned int VkHardwareTexture::CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, const char *name)
{
// CreateTexture is used by the software renderer to create a screen output but without any screen data.
if (buffer)
CreateTexture(w, h, mTexelsize, mTexelsize == 4 ? VK_FORMAT_B8G8R8A8_UNORM : VK_FORMAT_R8_UNORM, buffer, mipmap);
return 0;
}