Win32 - TraceLogger - fixed old message from XDSP about F2 to pause. Now it displays the current hotkey mapping.

This commit is contained in:
adelikat 2009-03-12 02:40:24 +00:00
parent e7a6f54356
commit 8864ee1c5a
2 changed files with 21 additions and 2 deletions

View File

@ -1,4 +1,5 @@
---version 2.0.4 yet to be released---
11-mar-2009 - adelikat - Win32 - Trace Logger - changed message about F2 pause (left over from FCEUXDSP) to display the current hotkey mapping
11-mar-2009 - adelikat - Added frame counter to savestates
08-mar-2009 - adelikat - Lua - added input.get() function
08-mar-2009 - adelikat - Lua - memory.readbyte will recognize frozen addresses

View File

@ -32,6 +32,12 @@
#include "tracer.h"
#include "memview.h"
//Used to determine the current hotkey mapping for the pause key in order to display on the dialog
#include "mapinput.h"
#include "input.h"
using namespace std;
//#define LOG_SKIP_UNMAPPED 4
//#define LOG_ADD_PERIODS 8
@ -68,6 +74,12 @@ void EnableTracerMenuItems(void);
int PromptForCDLogger(void);
BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
//Assemble the message to pause the game. Uses the current hotkey mapping dynamically
string m1 = "Press " ;
string m2 = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_PAUSE]);
string m3 = " to pause the game, or snap \r\nthe debugger to update this window.\r\n";
string message = m1+m2+m3;
int i;
LOGFONT lf;
switch(uMsg) {
@ -168,7 +180,7 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
//todo: if this gets unchecked then we need to clear out the window
log_update_window ^= 1;
if(!FCEUI_EmulationPaused() && !log_update_window) //mbg merge 7/19/06 changed to use EmulationPaused()
SetDlgItemText(hTracer, IDC_TRACER_LOG, "Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n");
SetDlgItemText(hTracer, IDC_TRACER_LOG, message.c_str());
//PauseLoggingSequence();
break;
case IDC_BTN_LOG_BROWSE:
@ -218,6 +230,12 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
void BeginLoggingSequence(void){
//Assemble the message to pause the game. Uses the current hotkey mapping dynamically
string m1 = "Press ";
string m2 = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_PAUSE]);
string m3 = " to pause the game, or snap \r\nthe debugger to update this window.\r\n";
string pauseMessage = m1 + m2 + m3;
char str[2048], str2[100];
int i, j;
@ -242,7 +260,7 @@ void BeginLoggingSequence(void){
}
sprintf(str2,"%d Bytes Allocated...\r\n",j*80);
strcat(str,str2);
strcat(str,"Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n");
strcat(str,pauseMessage.c_str());
SetDlgItemText(hTracer, IDC_TRACER_LOG, str);
tracelogbufpos = tracelogbufusedsize = 0;
}