Commits

spencercw committed c09e82b

Tidy up input handling a bit.

Comments (0)

Files changed (2)

gb_emulator/src/gb_input.cpp

 				switch (message.wParam)
 				{
 				// A
-				case 0x41:
+				case 'A':
 				case VK_RETURN:
 				case VK_SPACE:
 					key = KEY_A;
 					break;
 
 				// B
-				case 0x42:
+				case 'B':
 				case VK_ESCAPE:
 				case VK_BACK:
 					key = KEY_B;
 							exit(0);
 							break;
 
+						// Debugging
+						#ifdef DEBUG
+						case 'P':  // P
+							gb_.cpu_->pause = !gb_.cpu_->pause;
+							break;
 						case 'R':
 							// Toggle audio recording
 							if (!recording_)
 							}
 							recording_ = !recording_;
 							break;
-
-						// Debugging
-						#ifdef DEBUG
-						case 0x50:  // P
-							gb_.cpu_->pause = !gb_.cpu_->pause;
-							break;
-						case 0x43:  // C
+						case 'C':  // C
 							gb_.video_->drawBackground = !gb_.video_->drawBackground;
 							break;
-						case 0x57:  // W
+						case 'W':  // W
 							gb_.video_->drawWindow = !gb_.video_->drawWindow;
 							break;
-						case 0x53:  // S
+						case 'S':  // S
 							gb_.video_->drawSprites = !gb_.video_->drawSprites;
 							break;
-						case 0x44:  // D
+						case 'D':  // D
 							gb_.video_->dumpGraphics();
 							break;
 						#endif

gb_emulator_main/gb_emulator.rc

Binary file modified.