mirror of
https://github.com/encounter/SDL.git
synced 2025-12-17 17:05:23 +00:00
Merge VideoBootStrap::available into VideoBootStrap::create
The two are only ever called together, and combining them makes it possible to eliminate redundant symbol loading and redundant attempts to connect to a display server.
This commit is contained in:
@@ -60,12 +60,11 @@
|
||||
static int DirectFB_VideoInit(_THIS);
|
||||
static void DirectFB_VideoQuit(_THIS);
|
||||
|
||||
static int DirectFB_Available(void);
|
||||
static SDL_VideoDevice *DirectFB_CreateDevice(int devindex);
|
||||
|
||||
VideoBootStrap DirectFB_bootstrap = {
|
||||
"directfb", "DirectFB",
|
||||
DirectFB_Available, DirectFB_CreateDevice
|
||||
DirectFB_CreateDevice
|
||||
};
|
||||
|
||||
static const DirectFBSurfaceDrawingFlagsNames(drawing_flags);
|
||||
@@ -74,15 +73,6 @@ static const DirectFBAccelerationMaskNames(acceleration_mask);
|
||||
|
||||
/* DirectFB driver bootstrap functions */
|
||||
|
||||
static int
|
||||
DirectFB_Available(void)
|
||||
{
|
||||
if (!SDL_DirectFB_LoadLibrary())
|
||||
return 0;
|
||||
SDL_DirectFB_UnLoadLibrary();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
DirectFB_DeleteDevice(SDL_VideoDevice * device)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user