/*
* Descent 3
* Copyright (C) 2024 Parallax Software
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
/*
* $Logfile: /DescentIII/Main/ddio_lnx/lnxkey_svga.cpp $
* $Revision: 1.2 $
* $Date: 2000/04/27 11:17:53 $
* $Author: icculus $
*
* Linux SVGALIB routines
*
* $Log: lnxkey_svga.cpp,v $
* Revision 1.2 2000/04/27 11:17:53 icculus
* Added #if 0 fence.
*
* Revision 1.1.1.1 2000/04/18 00:00:33 icculus
* initial checkin
*
*
* 5 7/14/99 9:06p Jeff
* added comment header
*
* $NoKeywords: $
*/
// Keyboard handler for SVGAlib
#if 0
Don't use this code.
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "ddio_common.h"
#include "ddio.h"
#include "mono.h"
#include "pserror.h"
//##########################################################
//SVGALib Interface Functions
//##########################################################
#define DECLARE_POINTERS
#include "linux/dyna_svga.h"
#undef DECLARE_POINTERS
void ddio_SVGA_EmergencyQuit(int id);
void ddio_SVGA_InternalKeyInit(void);
void ddio_SVGA_KeyBoardEventHandler(int scancode, int press);
static int ddio_SVGA_TransKey(int scancode);
void ddio_SVGA_DoKeyFrame(void);
void ddio_SVGA_InternalClose(void);
void ddio_svga_InternalKeyClose(void);
//##########################################################
extern volatile struct tLnxKeys
{
union{
int up_ticks;
float up_time;
};
union{
int down_ticks;
float down_time;
};
bool status;
}LKeys[DDIO_MAX_KEYS];
bool DDIO_svga_key_suspend = false;
bool ddio_svga_InternalKeyInit(ddio_init_info *init_info)
{
if(!LoadSVGALib(true))
{
fprintf(stderr,"Unable to initialize SVGAlib\n");
return false;
}
static bool first_call = true;
//reset key list
for(int i=0;i