mirror of https://github.com/stella-emu/stella.git
Clear FB before running autodetection.
This commit is contained in:
parent
1c10f55bb0
commit
35ae38572c
|
@ -12,5 +12,19 @@
|
|||
"editor.trimAutoWhitespace": true,
|
||||
"editor.useTabStops": false,
|
||||
"C_Cpp.intelliSenseEngine": "Default",
|
||||
"files.insertFinalNewline": true
|
||||
"files.insertFinalNewline": true,
|
||||
"files.associations": {
|
||||
"__split_buffer": "cpp",
|
||||
"__tree": "cpp",
|
||||
"atomic": "cpp",
|
||||
"deque": "cpp",
|
||||
"ios": "cpp",
|
||||
"list": "cpp",
|
||||
"map": "cpp",
|
||||
"set": "cpp",
|
||||
"string": "cpp",
|
||||
"string_view": "cpp",
|
||||
"system_error": "cpp",
|
||||
"vector": "cpp"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -298,3 +298,10 @@ void FrameBufferSDL2::readPixels(uInt8* pixels, uInt32 pitch,
|
|||
|
||||
SDL_RenderReadPixels(myRenderer, &r, 0, pixels, pitch);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FrameBufferSDL2::clear()
|
||||
{
|
||||
invalidate();
|
||||
postFrameUpdate();
|
||||
}
|
||||
|
|
|
@ -95,6 +95,11 @@ class FrameBufferSDL2 : public FrameBuffer
|
|||
*/
|
||||
void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const override;
|
||||
|
||||
/**
|
||||
Clear the frame buffer
|
||||
*/
|
||||
void clear() override;
|
||||
|
||||
protected:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// The following are derived from protected methods in FrameBuffer.hxx
|
||||
|
|
|
@ -117,8 +117,9 @@ Console::Console(OSystem& osystem, unique_ptr<Cartridge>& cart,
|
|||
const string& md5 = myProperties.get(Cartridge_MD5);
|
||||
setControllers(md5);
|
||||
|
||||
// Mute audio while autodetection runs
|
||||
// Mute audio and clear framebuffer while autodetection runs
|
||||
myOSystem.sound().mute(1);
|
||||
myOSystem.frameBuffer().clear();
|
||||
|
||||
if(myDisplayFormat == "AUTO" || myOSystem.settings().getBool("rominfo"))
|
||||
{
|
||||
|
|
|
@ -304,6 +304,11 @@ class FrameBuffer
|
|||
*/
|
||||
virtual void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const = 0;
|
||||
|
||||
/**
|
||||
Clear the framebuffer.
|
||||
*/
|
||||
virtual void clear() = 0;
|
||||
|
||||
protected:
|
||||
/**
|
||||
This method is called to query and initialize the video hardware
|
||||
|
|
Loading…
Reference in New Issue