Hmm - why is that not possible at the moment? The code to which you were referring is not in handmade_platform.h, it's in handmade.h, which is not included by the platform layer. Is there some reason your platform layer has to include handmade.h as well, or am I misunderstanding the problem?
I include handmade.h in the platform layer in order to get the definitions for:
- internal, local_persist, global_variable
- Kilobytes, Megabytes, Gigabytes, Terabytes
Yes, I could live without most of them in the platform layer or redefine them myself, but I was trying to keep consistent with your code style and not worry about some of my redefinitions getting out of sync with something (like Assert()) that you might change in the future (I'm not so worried about the definition of Gigabytes changing). And they seem like reasonable things to put in handmade_platform.h
I tested moving the above definitions from handmade.h to handmade_platform.h. Then I removed all includes of handmade.h from my platform layer source files so that the only .h file I include is handmade_platform.h and everything compiled and ran fine. It feels much cleaner, and now you can treat handmade.h as inside the private black box of the platform-independent game code. I also tested the changes under win32 and it still compiles clean and runs fine there.
Except for GetController(), I put all of the above definitions in handmade_platform.h right after the numeric typedef section near the top. GetController() needed to be placed after the game_input structure was defined near the bottom of the file. I can send you my versions of the files if you want to see the diffs.