mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-10 06:02:10 +08:00
engine: platform: move Host_Minimize_f into platform code
This commit is contained in:
@@ -27,6 +27,11 @@ GNU General Public License for more details.
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void Platform_Minimize_f( void )
|
||||
{
|
||||
// stub
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
Android_SwapBuffers
|
||||
|
||||
@@ -28,6 +28,11 @@ struct fb_s
|
||||
|
||||
#define DEFAULT_FBDEV "/dev/fb0"
|
||||
|
||||
void Platform_Minimize_f( void )
|
||||
{
|
||||
// stub
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
Android_SwapBuffers
|
||||
|
||||
@@ -257,7 +257,6 @@ void Platform_SetClipboardText( const char *buffer );
|
||||
#if XASH_SDL == 1
|
||||
#define SDL_SetWindowGrab( wnd, state ) SDL_WM_GrabInput( (state) ? SDL_GRAB_ON : SDL_GRAB_OFF )
|
||||
#define SDL_GetWindowGrab( wnd ) ( SDL_WM_GrabInput( SDL_GRAB_QUERY ) != SDL_GRAB_OFF )
|
||||
#define SDL_MinimizeWindow( wnd ) SDL_WM_IconifyWindow()
|
||||
#define SDL_IsTextInputActive() host.textmode
|
||||
#endif
|
||||
|
||||
@@ -311,6 +310,7 @@ void GL_SwapBuffers( void );
|
||||
void *SW_LockBuffer( void );
|
||||
void SW_UnlockBuffer( void );
|
||||
qboolean SW_CreateBuffer( int width, int height, uint *stride, uint *bpp, uint *r, uint *g, uint *b );
|
||||
void Platform_Minimize_f( void );
|
||||
|
||||
|
||||
//
|
||||
|
||||
@@ -33,6 +33,11 @@ struct
|
||||
SDL_Surface *win;
|
||||
} sw;
|
||||
|
||||
void Platform_Minimize_f( void )
|
||||
{
|
||||
SDL_WM_IconifyWindow();
|
||||
}
|
||||
|
||||
qboolean SW_CreateBuffer( int width, int height, uint *stride, uint *bpp, uint *r, uint *g, uint *b )
|
||||
{
|
||||
sw.width = width;
|
||||
|
||||
@@ -35,6 +35,12 @@ struct
|
||||
SDL_Surface *win;
|
||||
} sw;
|
||||
|
||||
void Platform_Minimize_f( void )
|
||||
{
|
||||
if( host.hWnd )
|
||||
SDL_MinimizeWindow( host.hWnd );
|
||||
}
|
||||
|
||||
qboolean SW_CreateBuffer( int width, int height, uint *stride, uint *bpp, uint *r, uint *g, uint *b )
|
||||
{
|
||||
sw.width = width;
|
||||
|
||||
Reference in New Issue
Block a user