1
0
Fork 0

jumpwise optimalisations

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2155
This commit is contained in:
Peter Veenstra 2005-03-25 10:12:05 +00:00
parent 22cb26c298
commit 5a3f4fb38d
2 changed files with 20 additions and 15 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: callback.cpp,v 1.25 2005-03-25 08:40:42 qbix79 Exp $ */
/* $Id: callback.cpp,v 1.26 2005-03-25 10:12:04 qbix79 Exp $ */
#include <stdlib.h>
#include <string.h>
@ -220,18 +220,20 @@ CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
}
void CALLBACK_HandlerObject::Install(CallBack_Handler handler,Bitu type,const char* description){
if(installed) E_Exit("Allready installed");
m_type=SETUP;
m_callback=CALLBACK_Allocate();
CALLBACK_Setup(m_callback,handler,type,description);
installed=true;
if(!installed) {
installed=true;
m_type=SETUP;
m_callback=CALLBACK_Allocate();
CALLBACK_Setup(m_callback,handler,type,description);
} else E_Exit("Allready installed");
}
void CALLBACK_HandlerObject::Set_RealVec(Bit8u vec){
if(vectorhandler.installed) E_Exit ("double usage of vector handler");
vectorhandler.installed=true;
vectorhandler.interrupt=vec;
RealSetVec(vec,Get_RealPointer(),vectorhandler.old_vector);
if(!vectorhandler.installed) {
vectorhandler.installed=true;
vectorhandler.interrupt=vec;
RealSetVec(vec,Get_RealPointer(),vectorhandler.old_vector);
} else E_Exit ("double usage of vector handler");
}
void CALLBACK_Init(Section* sec) {