mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
Fix simulator restart issue (#3814)
* Fix simulator restart issue * fix conversion error
This commit is contained in:
@@ -94,7 +94,7 @@ void CCVKBuffer::doDestroy() {
|
||||
}
|
||||
|
||||
void CCVKBuffer::doResize(uint size, uint count) {
|
||||
uint oldStartOffset = _gpuBuffer->startOffset;
|
||||
VkDeviceSize oldStartOffset = _gpuBuffer->startOffset;
|
||||
|
||||
CCVKDevice::getInstance()->getMemoryStatus().bufferSize -= _size;
|
||||
CCVKDevice::getInstance()->gpuRecycleBin()->collect(_gpuBuffer);
|
||||
|
||||
@@ -936,7 +936,7 @@ public:
|
||||
}
|
||||
}
|
||||
// for resize events
|
||||
void update(const CCVKGPUBuffer *buffer, uint oldStartOffset) {
|
||||
void update(const CCVKGPUBuffer *buffer, VkDeviceSize oldStartOffset) {
|
||||
for (const auto &it : _buffers) {
|
||||
if (it.first->gpuBuffer != buffer) continue;
|
||||
const auto &info = it.second;
|
||||
|
||||
@@ -520,7 +520,7 @@ int SimulatorWin::run()
|
||||
updateWindowTitle();
|
||||
|
||||
bool resume, pause, close;
|
||||
se::ScriptEngine::getInstance()->addRegisterCallback(setCanvasCallback);
|
||||
se::ScriptEngine::getInstance()->addPermanentRegisterCallback(setCanvasCallback);
|
||||
|
||||
if (!_app->init()) return 1;
|
||||
_quit = false;
|
||||
|
||||
Reference in New Issue
Block a user