mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-13 07:05:12 +01:00
Set screenshot through a setter
This commit is contained in:
parent
54e41df785
commit
b3a33134aa
@ -50,7 +50,7 @@ public:
|
||||
virtual void timeoutCallback()
|
||||
{
|
||||
if (!Gui::gui->cur_gameInfo->screenshot)
|
||||
Gui::gui->cur_gameInfo->screenshot = TheC64->TheDisplay->SurfaceFromC64Display();
|
||||
Gui::gui->cur_gameInfo->setScreenshot(TheC64->TheDisplay->SurfaceFromC64Display());
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
@ -210,3 +210,10 @@ void GameInfo::setName(const char *name)
|
||||
free((void*)this->name);
|
||||
this->name = xstrdup(name);
|
||||
}
|
||||
|
||||
|
||||
void GameInfo::setScreenshot(SDL_Surface *scr)
|
||||
{
|
||||
SDL_FreeSurface(this->screenshot);
|
||||
this->screenshot = scr;
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ public:
|
||||
|
||||
void setName(const char *name);
|
||||
|
||||
void setScreenshot(SDL_Surface *scr);
|
||||
|
||||
void resetDefaults();
|
||||
|
||||
/** Returns an allocated dump structure */
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
switch (which)
|
||||
{
|
||||
case 0:
|
||||
this->box->gi->screenshot = TheC64->TheDisplay->SurfaceFromC64Display();;
|
||||
this->box->gi->setScreenshot(TheC64->TheDisplay->SurfaceFromC64Display());
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
@ -65,7 +65,7 @@ public:
|
||||
{
|
||||
SDL_Surface *p = TheC64->TheDisplay->SurfaceFromC64Display();
|
||||
|
||||
this->box->gi->screenshot = p;
|
||||
this->box->gi->setScreenshot(p);
|
||||
}
|
||||
Gui::gui->popView();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user