From 86bd06801fb9a2795c4aa5bb848f7275acf45a66 Mon Sep 17 00:00:00 2001 From: luigi__ Date: Sun, 13 Sep 2009 19:59:26 +0000 Subject: [PATCH] Small feature: add a possibility to make "Emulation paused/unpaused" messages optional when calling NDS_Pause()/NDS_Unpause() by adding them a parameter defaulted to true. Shouldn't break anything. --- desmume/src/windows/main.cpp | 8 ++++---- desmume/src/windows/main.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 403423157..5d634b5d5 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -1455,7 +1455,7 @@ DWORD WINAPI run() return 1; } -void NDS_Pause() +void NDS_Pause(bool showMsg) { if (!paused) { @@ -1463,11 +1463,11 @@ void NDS_Pause() paused = TRUE; SPU_Pause(1); while (!paused) {} - INFO("Emulation paused\n"); + if (showMsg) INFO("Emulation paused\n"); } } -void NDS_UnPause() +void NDS_UnPause(bool showMsg) { if (romloaded && paused) { @@ -1475,7 +1475,7 @@ void NDS_UnPause() pausedByMinimize = FALSE; execute = TRUE; SPU_Pause(0); - INFO("Emulation unpaused\n"); + if (showMsg) INFO("Emulation unpaused\n"); } } diff --git a/desmume/src/windows/main.h b/desmume/src/windows/main.h index b4772cb00..19d1bd65c 100644 --- a/desmume/src/windows/main.h +++ b/desmume/src/windows/main.h @@ -5,8 +5,8 @@ extern WINCLASS *MainWindow; extern volatile bool execute, paused; -void NDS_Pause(); -void NDS_UnPause(); +void NDS_Pause(bool showMsg = true); +void NDS_UnPause(bool showMsg = true); void LoadSaveStateInfo(); void Display(); void Pause();