Skip to content

Commit

Permalink
- backend fixes from GZDoom.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Apr 25, 2021
1 parent 3ad4a86 commit dca9644
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions source/common/console/c_bind.cpp
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion source/common/filesystem/filesystem.cpp
Expand Up @@ -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)
{
Expand Down
4 changes: 3 additions & 1 deletion source/common/rendering/vulkan/textures/vk_hwtexture.cpp
Expand Up @@ -270,7 +270,9 @@ uint8_t *VkHardwareTexture::MapBuffer()

unsigned int VkHardwareTexture::CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, const char *name)
{
CreateTexture(w, h, mTexelsize, mTexelsize == 4 ? VK_FORMAT_B8G8R8A8_UNORM : VK_FORMAT_R8_UNORM, buffer, mipmap);
// 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;
}

Expand Down

0 comments on commit dca9644

Please sign in to comment.