Fix new project to write full ROM.oxfs buffer
This commit is contained in:
parent
287168a6cc
commit
04211bb1ac
@ -37,7 +37,7 @@ void Project::create() {
|
|||||||
|
|
||||||
QFile file(m_path + ROM_FILE);
|
QFile file(m_path + ROM_FILE);
|
||||||
file.open(QIODevice::WriteOnly);
|
file.open(QIODevice::WriteOnly);
|
||||||
file.write((const char*) buff);
|
file.write((const char*) buff, buffSize);
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,8 @@ int Project::openRomFs() {
|
|||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
file.open(QIODevice::ReadOnly);
|
file.open(QIODevice::ReadOnly);
|
||||||
if (file.read((char*) buff, buffSize) > 0) {
|
if (file.read((char*) buff, buffSize) > 0) {
|
||||||
m_fs = createFileSystem((uint8_t*) buff, buffSize, true);
|
m_fs = createFileSystem(buff, buffSize, true);
|
||||||
|
if (m_fs) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
@ -56,6 +57,9 @@ int Project::openRomFs() {
|
|||||||
} else {
|
} else {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Project::saveRomFs() {
|
int Project::saveRomFs() {
|
||||||
|
Loading…
Reference in New Issue
Block a user