cinera_handmade.network/cmuratori/hero/code/code006.hmml

42 lines
2.6 KiB
Plaintext
Raw Permalink Normal View History

[video output=day006 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code template=code006_template.html title="Gamepad and Keyboard Input" vod_platform=youtube id=J3y1x54vyIQ annotator=jacebennett annotator=Miblo annotator=garlandobloom]
[0:51][Getting input from a gamepad: XInput]
[3:20][Using XInput in the codebase]
[6:26][A look at the XInput API more in depth.]
[7:40][Programming using XInput API]
[9:09][Discussing the controller's state: using XINPUT_STATE struct]
[11:30][Using XINPUT_GAMEPAD struct]
[16:57][Handling unresolved external symbol XInputGetState]
[26:03][Discussing access violations]
[26:52][Safeguarding against access violations]
[31:50][Defining and implementing Win32LoadXinput function]
[37:22][Playing with the X and Y offset]
[38:00][Casey looking for his gamepad]
[38:50][Casey showcases pink controller]
[41:09][XINPUT_VIBRATION]
[43:05][#milkhit]
[46:55][Testingand handling button/key presses]
[55:10][(Extra) ANSI String Handling]
[56:10][(Extra) Not passing something by value anymore]
[58:10][Summary and things to come before beginning Q&A]
[59:08][LParam 30 is always up for WM_KEYUP]
[59:57][Why uppercase variable names?]
[1:00:21][Can you explain your macro and referencing XInput functions again?]
[1:03:15][What's the size when copying becomes problematic for a struct?]
[1:04:27][About (premature) optimisation]
[1:08:27][How does the linker find the XInput DLL on the users machine? \[...\] Can we distribute the DLL?]
[1:12:52][Is \[the dynamic linker\] allowed to link XInput in compile time?]
[1:14:02][Why you chose an if-else cascade for key input instead of switch statement? It's up for grabs.]
[1:15:13][How do you know the XInput stub things work without testing it on XP computer without XInput installed?]
[1:17:03][Is it a waste of time to check if GetProcAddress() returns zero?]
[1:19:12][Modify code to use the controller stick]
[1:22:14][Where do the WParam and LParam come from?]
[1:24:17][Why did MS decide to use link and import library instead of true dynamic linking?]
[1:25:13][When are we going to get @naysayer88 and @cmuratori combination game?]
[1:26:19][On Unix you don't need to link to a .so file at all to use a .so file where as on MS platforms you need a .lib file]
[1:27:33][In the far future will you use DirectX or OpenGL or what?]
[1:28:05][We will be drawing the whole screen every frame.]
[1:28:47][Why does Valgrind make it look so scary when you don't free()?]
[1:29:48][It looks like WParam and LParam are 32bit on XP]
[1:30:12][Is it possible to keep your framerate consistent while dragging the window around? Doing repaint on WM_MOVE is slow.]
[/video]