fixing device choosing in EGL

This commit is contained in:
2025-03-23 02:24:55 +01:00
parent 6c2119d806
commit f3a8252ff1
5 changed files with 148 additions and 31 deletions

View File

@@ -2,6 +2,8 @@
// This file is part of "Pulse"
// For conditions of distribution and use, see copyright notice in LICENSE
#include <string.h>
#include "PulseInternal.h"
#ifndef PULSE_PLAT_WASM
@@ -81,3 +83,11 @@ void PulseUnloadLibrary(PulseLibModule module)
dlclose(module);
#endif
}
uint32_t PulseHashString(const char* str)
{
uint32_t hash = 5381;
for(size_t i = 0; i < strlen(str); i++)
hash = ((hash << 5) + hash) + str[i];
return hash;
}