the j
This commit is contained in:
parent
00084ddb11
commit
63a4eb8a62
1 changed files with 36 additions and 40 deletions
|
|
@ -25,7 +25,13 @@
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
GLFWwindow *window;
|
||||
|
||||
|
||||
|
||||
|
||||
bool CustomWindowShouldClose(void) {
|
||||
return glfwWindowShouldClose(window);
|
||||
}
|
||||
|
||||
int CustomInitPlatform(void) {
|
||||
if (!glfwInit())
|
||||
{
|
||||
|
|
@ -89,10 +95,14 @@ void CustomClosePlatform(void) {
|
|||
int main(void)
|
||||
{
|
||||
union OverridableFunctionPointer funcs;
|
||||
funcs.InitPlatform = CustomInitPlatform;
|
||||
funcs.ClosePlatform = CustomClosePlatform;
|
||||
funcs.WindowShouldClose = CustomWindowShouldClose;
|
||||
CustomInitPlatform();
|
||||
|
||||
OverrideInternalFunction("InitPlatform",&funcs);
|
||||
//OverrideInternalFunction("InitPlatform",&funcs);
|
||||
OverrideInternalFunction("ClosePlatform",&funcs);
|
||||
OverrideInternalFunction("WindowShouldClose",&funcs);
|
||||
|
||||
RenderTexture2D fb = LoadRenderTexture(80,24);
|
||||
|
||||
|
|
@ -114,6 +124,6 @@ int main(void)
|
|||
glfwPollEvents();
|
||||
}
|
||||
|
||||
CustomClosePlatform();
|
||||
//CustomClosePlatform();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue