Win32 - AVI Capture - added started/ended messages to the screen.

This commit is contained in:
adelikat 2009-04-12 22:15:08 +00:00
parent d8601e00a3
commit 6aa80c44cf
3 changed files with 17 additions and 3 deletions

View File

@ -18,7 +18,7 @@
* along with DeSmuME; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "main.h" //I added this so that this file could gain access to SetMessageToDisplay.
#include "types.h"
#include "windriver.h"
#include "console.h"
@ -374,8 +374,10 @@ bool DRV_AviBegin(const char* fname)
}
// Don't display at file splits
if(!avi_segnum)
if(!avi_segnum) {
EMU_PrintMessage("AVI recording started.");
SetMessageToDisplay("AVI recording started.");
}
strncpy(saved_cur_avi_fnameandext,fname,MAX_PATH);
strncpy(saved_avi_fname,fname,MAX_PATH);
@ -438,8 +440,10 @@ void DRV_AviEnd()
return;
// Don't display if we're just starting another segment
if(avi_file->tBytes <= 2097152000)
if(avi_file->tBytes <= 2097152000) {
EMU_PrintMessage("AVI recording ended.");
SetMessageToDisplay("AVI recording ended.");
}
avi_destroy(&avi_file);
}

View File

@ -3722,4 +3722,13 @@ void ResetGame()
CheatsSearchReset();
NDS_Reset();
frameCounter=0;
}
void SetMessageToDisplay(const char *message)
{
MessageToDisplay.str(""); //adelikat: Clear previous message //TODO set up a queue system, and/or a multiline system, instead of rudely cancelling out messages.
//adelikat: TODO: set up a function that does the clearing and setting of the counter, so this code doesn't have to be done all over the place
// make the function receive an int for the counter, but overload so that if no int, 120 is used
MessageToDisplay << message;
displayMessageCounter = 120;//
}

View File

@ -15,6 +15,7 @@ void FrameAdvance();
void ResetGame(); //Resets game (for the menu item & hotkey
void AviRecordTo();
void AviEnd();
void SetMessageToDisplay(const char *message); //For sending output to the main screen
extern bool ShowInputDisplay;
extern bool frameCounterDisplay;