Skip to content
Browse files

stop showing "wrote battery" msg on panel #318

Remove the "wrote battery" system message that is painted on the panel,
because it annoys people, and show errors writing the battery with

Signed-off-by: Rafael Kitover <>
  • Loading branch information...
rkitover committed Mar 2, 2019
1 parent 646557e commit d2922cfc5d8e5679ebaae4abfd5bd8a769388a03
Showing with 5 additions and 11 deletions.
  1. +4 −10 src/wx/panel.cpp
  2. +1 −1 src/wx/wxvbam.h
@@ -503,7 +503,7 @@ void GameArea::UnloadGame(bool destruct)
// if timer was counting down for save, go ahead and save
// this might not be safe, though..
if (systemSaveUpdateCounter > SYSTEM_SAVE_NOT_UPDATED) {

MainFrame* mf = wxGetApp().frame;
@@ -633,7 +633,7 @@ bool GameArea::SaveState(const wxFileName& fname)
return ret;

void GameArea::SaveBattery(bool quiet)
void GameArea::SaveBattery()
// MakeInstanceFilename doesn't do wxString, so just add slave ID here
wxString bname = game_name();
@@ -653,20 +653,14 @@ void GameArea::SaveBattery(bool quiet)
// auto-conversion of wxCharBuffer to const char * seems broken
// so save underlying wxCharBuffer (or create one of none is used)
wxCharBuffer fnb = fn.mb_fn_str();
wxString msg;

// FIXME: add option to support ring of backups
// of course some games just write battery way too often for such
// a thing to be useful
if (emusys->emuWriteBattery(
msg.Printf(_("Wrote battery %s"), fn.mb_str());
msg.Printf(_("Error writing battery %s"), fn.mb_str());
if (!emusys->emuWriteBattery(
wxLogError(wxT("Error writing battery %s"), fn);

systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED;

if (!quiet)

void GameArea::AddBorder()
@@ -513,7 +513,7 @@ class GameArea : public wxPanel, public HiDPIAware {
bool SaveState(const wxFileName& fname);

// save to default location
void SaveBattery(bool quiet = false);
void SaveBattery();

// true if file at default location may not match memory
bool cheats_dirty;

0 comments on commit d2922cf

Please sign in to comment.
You can’t perform that action at this time.