November 27, 200619 yr I tested this code outside of the sim, and it worked... but interestingly... when I trigger it in the sim, the 1st character (code[0]) never shows up.So, if I enter "2345" in the scratchpad, then hit the key to trigger this method, I get "345" in the Xpdr.void Xpdr::SetXpdr1Code(){ UINT32 bcd = 0; // encoded xpdr code (ie 1200 coded to 4608) const wchar_t *code = ScratchPad::GetText().c_str(); bcd = (code[0] - 0x30) << 12; bcd += (code[1] - 0x30) << 8; bcd += (code[2] - 0x30) << 4; bcd += (code[3] - 0x30); trigger_key_event(KEY_XPNDR_SET, bcd);}If I set a break point, I do see the full text "2345" is in the scratchpad, but strangely I can't see any of the local variables in the debugger.More strangely, the code works fine in a console app with the *code = "2345".Anyone see why this happens??
Create an account or sign in to comment