void DOS_UninstallMisc(void) { /* these vectors shouldn't exist when booting a guest OS */ if (call_int2a) { RealSetVec(0x2a,0); CALLBACK_DeAllocate(call_int2a); call_int2a=0; } if (call_int2f) { RealSetVec(0x2f,0); CALLBACK_DeAllocate(call_int2f); call_int2f=0; } }
CALLBACK_HandlerObject::~CALLBACK_HandlerObject() { if (!installed) return; if (m_type == CALLBACK_HandlerObject::SETUP) { if (vectorhandler.installed) { // See if we are the current handler. if so restore the old one if (RealGetVec(vectorhandler.interrupt) == Get_RealPointer()) RealSetVec(vectorhandler.interrupt, vectorhandler.old_vector); else LOG(LOG_MISC,LOG_WARN)("Interrupt vector changed on %X %s", vectorhandler.interrupt, CALLBACK_GetDescription(m_callback)); } CALLBACK_RemoveSetup(m_callback); } else if (m_type == CALLBACK_HandlerObject::SETUPAT) E_Exit("Callback: SETUP at not handled yet."); else if (m_type == CALLBACK_HandlerObject::NONE) { // Do nothing. Merely DeAllocate the callback } else E_Exit("What kind of callback is this!"); if (CallBack_Description[m_callback]) delete [] CallBack_Description[m_callback]; CallBack_Description[m_callback] = 0; CALLBACK_DeAllocate(m_callback); }
void VESA_OnReset_Clear_Callbacks(void) { if (callback.rmWindow != 0) { CALLBACK_DeAllocate(callback.rmWindow); callback.rmWindow = 0; } if (callback.pmPalette != 0) { CALLBACK_DeAllocate(callback.pmPalette); callback.pmPalette = 0; } if (callback.pmStart != 0) { CALLBACK_DeAllocate(callback.pmStart); callback.pmStart = 0; } if (callback.pmWindow != 0) { CALLBACK_DeAllocate(callback.pmWindow); callback.pmWindow = 0; } }