Fixed stack overflow issue
This commit is contained in:
parent
dd8aecbc5b
commit
a07839e5af
|
@ -36,7 +36,7 @@ endif
|
|||
|
||||
# Building tester tool for QuickerNES
|
||||
|
||||
quickerNESTester = executable('qrTester',
|
||||
quickerNESTester = executable('quickerNESTester',
|
||||
'source/tester.cpp',
|
||||
cpp_args : [ commonCompileArgs, '-Werror' ],
|
||||
dependencies : [ quickerNESDependency, toolDependency ],
|
||||
|
@ -45,7 +45,7 @@ quickerNESTester = executable('qrTester',
|
|||
|
||||
# Building tester tool for the original QuickNES
|
||||
|
||||
quickNESTester = executable('qTester',
|
||||
quickNESTester = executable('quickNESTester',
|
||||
'source/tester.cpp',
|
||||
cpp_args : [ commonCompileArgs ],
|
||||
dependencies : [ quickNESDependency, toolDependency ],
|
||||
|
|
|
@ -19,6 +19,12 @@ class QuickNESInstance : public EmuInstance
|
|||
// Creating new emulator
|
||||
_nes = new Nes_Emu;
|
||||
|
||||
// Allocating video buffer
|
||||
video_buffer = (uint8_t*) malloc(image_width * image_height);
|
||||
|
||||
// Setting video buffer
|
||||
_nes->set_pixels(video_buffer, image_width+8);
|
||||
|
||||
// Setting video buffer
|
||||
_nes->set_pixels(video_buffer, image_width+8);
|
||||
|
||||
|
@ -82,7 +88,7 @@ class QuickNESInstance : public EmuInstance
|
|||
}
|
||||
|
||||
// Video buffer
|
||||
uint8_t video_buffer[image_width * image_height];
|
||||
uint8_t* video_buffer;
|
||||
|
||||
// Emulator instance
|
||||
Nes_Emu* _nes;
|
||||
|
|
|
@ -13,6 +13,9 @@ class QuickerNESInstance : public EmuInstance
|
|||
// Creating new emulator
|
||||
_nes = new Nes_Emu;
|
||||
|
||||
// Allocating video buffer
|
||||
video_buffer = (uint8_t*) malloc(image_width * image_height);
|
||||
|
||||
// Setting video buffer
|
||||
_nes->set_pixels(video_buffer, image_width+8);
|
||||
}
|
||||
|
@ -70,7 +73,7 @@ class QuickerNESInstance : public EmuInstance
|
|||
}
|
||||
|
||||
// Video buffer
|
||||
uint8_t video_buffer[image_width * image_height];
|
||||
uint8_t* video_buffer;
|
||||
|
||||
// Emulator instance
|
||||
Nes_Emu* _nes;
|
||||
|
|
Loading…
Reference in New Issue