MCPcopy Create free account
hub / github.com/TASEmulators/fceux / CloseMemoryWatch

Function CloseMemoryWatch

src/drivers/win/memwatch.cpp:663–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663bool CloseMemoryWatch()
664{
665 int result = 0; //Flag for asking to save changes
666
667 if(hwndMemWatch)
668 {
669 SaveStrings();
670
671 if (fileChanged)
672 {
673 result = MessageBox(hwndMemWatch, "Save Changes?", "Memory Watch Settings", MB_YESNOCANCEL);
674 if (result == IDYES)
675 {
676 QuickSaveMemWatch();
677 DestroyWindow(hwndMemWatch);
678 hwndMemWatch=0;
679 return true; //true = User did not choose to cancel operation
680 }
681 else if (result == IDNO)
682 {
683 DestroyWindow(hwndMemWatch);
684 hwndMemWatch=0;
685 return true; //Don't run SaveMemWatch, but return true
686 }
687 else
688 return false; //User requested cancel, so abort the attempt to close
689 }
690 else //File was not changed so just close
691 {
692 DestroyWindow(hwndMemWatch);
693 hwndMemWatch=0;
694 }
695 }
696 return true;
697}
698
699//New File
700void ClearAllText()

Callers 2

MemWatchCallBFunction · 0.85
DoFCEUExitFunction · 0.85

Calls 2

SaveStringsFunction · 0.85
QuickSaveMemWatchFunction · 0.85

Tested by

no test coverage detected