// Pause the game
int exit_callback(int errcode) {
- printf("exit_callback called...\n");
+ printf("exit_callback called...\n");
+ hgw_context_destroy(hgw_context, HGW_BYE_INACTIVE);
return 0;
}
// Quit game
int quit_callback(int errcode) {
- printf("quit_callback called...\n");
- hgw_context_compat_destroy_quit(hgw_context);
+ printf("quit_callback called...\n");
+ hgw_context_destroy(hgw_context, HGW_BYE_INACTIVE);
return 0;
}
int flush_callback(int errcode) {
- printf("quit_callback called...\n");
+ printf("quit_callback called...\n");
+ hgw_context_destroy(hgw_context, HGW_BYE_INACTIVE);
return 0;
}
// Main game
play();
- hgw_context_compat_destroy_deinit(hgw_context);
+ // hgw_context_compat_destroy_deinit(hgw_context);
// hgw_context_compat_destroy_quit(hgw_context);
// hgw_context_destroy(hgw_context);
+ hgw_context_destroy(hgw_context, HGW_BYE_INACTIVE);
return 0;
}