mirror of https://github.com/WerWolv/ImHex.git
sys: Fixed Project load/save and Save as command
This commit is contained in:
parent
7498a72f70
commit
4e520938c9
|
@ -53,6 +53,8 @@ namespace hex {
|
|||
|
||||
ProjectFile::s_currProjectFilePath = filePath;
|
||||
|
||||
EventManager::post<EventProjectFileLoad>();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -85,8 +87,6 @@ namespace hex {
|
|||
ProjectFile::s_hasUnsavedChanged = false;
|
||||
ProjectFile::s_currProjectFilePath = filePath;
|
||||
|
||||
EventManager::post<EventProjectFileLoad>();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,10 +91,11 @@ namespace hex::prv {
|
|||
File file(path, File::Mode::Create);
|
||||
|
||||
if (file.isValid()) {
|
||||
std::vector<u8> buffer(std::min<size_t>(0xFF'FFFF, file.getSize()), 0x00);
|
||||
auto provider = ImHexApi::Provider::get();
|
||||
|
||||
std::vector<u8> buffer(std::min<size_t>(0xFF'FFFF, provider->getActualSize()), 0x00);
|
||||
size_t bufferSize = buffer.size();
|
||||
|
||||
auto provider = ImHexApi::Provider::get();
|
||||
for (u64 offset = 0; offset < provider->getActualSize(); offset += bufferSize) {
|
||||
if (bufferSize > provider->getActualSize() - offset)
|
||||
bufferSize = provider->getActualSize() - offset;
|
||||
|
|
Loading…
Reference in New Issue