mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
feat: Added automatic backups
This commit is contained in:
@@ -375,6 +375,9 @@ namespace hex::fs {
|
||||
case ImHexPath::Config:
|
||||
result = appendPath(getConfigPaths(), "config");
|
||||
break;
|
||||
case ImHexPath::Backups:
|
||||
result = appendPath(getDataPaths(), "backups");
|
||||
break;
|
||||
case ImHexPath::Encodings:
|
||||
result = appendPath(getDataPaths(), "encodings");
|
||||
break;
|
||||
|
||||
@@ -40,6 +40,9 @@ namespace ImGuiExt {
|
||||
}
|
||||
|
||||
Texture::Texture(const ImU8 *buffer, int size, Filter filter, int width, int height) {
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
unsigned char *imageData = stbi_load_from_memory(buffer, size, &this->m_width, &this->m_height, nullptr, 4);
|
||||
if (imageData == nullptr) {
|
||||
if (width * height * 4 > size)
|
||||
|
||||
Reference in New Issue
Block a user