F
fabstab
Guest
I'm making my game pause when a controller is detected as disconnected.. I've tried several methods of my own and followed other tutorials. And while the code works (it does pause, and the controller is detected as connected and/or disconnected and I can resume the game) however halfway through testing I'll get a blue screen of death, or when I shut my computer down for the night I'll get a blue screen of death.
Is there something I'm missing?
edit: I believe the last BSOD gave the message stop_error or something along those lines...
System Event:
Is there something I'm missing?
edit: I believe the last BSOD gave the message stop_error or something along those lines...
System Event:
Code:
switch (async_load[? "event_type"])
{
case "gamepad lost":
var pad = async_load[? "pad_index"];
cursor_sprite = sprcustomcursor1;
pause = 1;
instance_deactivate_all(true);
instance_activate_object(objgamepadmouse);
if instance_exists(objpause1)
{
instance_destroy(objpause1);
}
audio_pause_all();
break;
case "gamepad discovered":
var pad = async_load[? "pad_index"];
instance_activate_all();
pause = 0;
if instance_exists(objblackbars) || instance_exists(objblackbars2)
{
instance_deactivate_object(objdrawGUI);
}
break;
}