00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "Core/precomp.h"
00020
00021 #ifdef USE_SVGALIB
00022
00023 #include "API/Core/Display/display.h"
00024 #include "Core/System/Unix/implementation_svgalib.h"
00025 #include "Core/Display/Svgalib/displaycard_svgalib.h"
00026
00027 #include "API/Core/Input/input.h"
00028
00029 #include "Core/Input/TTY/keyboard_tty.h"
00030 #include "Core/Input/X11/joystick_linux.h"
00031 #include "implementation.h"
00032
00033
00034 extern "C"
00035 {
00036 DL_PREFIX char* clan_module_identify()
00037 {
00038 return "SVGAlib target";
00039 }
00040
00041 DL_PREFIX char* clan_module_abbreviation()
00042 {
00043 return "svga";
00044 }
00045
00046 DL_PREFIX void clan_module_init()
00047 {
00048 CL_Implementation_Svgalib::add_display();
00049 }
00050 }
00051
00052 char *svgalib_identify()
00053 {
00054 return clan_module_identify();
00055 }
00056
00057 char *svgalib_abbreviation()
00058 {
00059 return clan_module_abbreviation();
00060 }
00061
00062 void svgalib_init()
00063 {
00064 return clan_module_init();
00065 }
00066
00067
00068 void CL_Implementation_Svgalib::add_display()
00069 {
00070 int card_no = CL_Display::cards.size();
00071 CL_Display::cards.push_back(new CL_DisplayCard_Svgalib(card_no));
00072 }
00073
00074 void CL_Implementation_Svgalib::add_input()
00075 {
00076 CL_Input::keyboards.push_back(new CL_TTYKeyboard());
00077
00078
00079 #ifdef USE_JOY
00080 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
00081
00082 for (int i=0; i<8; i++)
00083 {
00084 CL_LinuxJoystick *joy = new CL_LinuxJoystick();
00085 if (joy->init(i))
00086 CL_Input::joysticks.push_back(joy);
00087 else
00088 delete joy;
00089 }
00090
00091 #endif
00092 #endif
00093
00094 }
00095
00096 #endif