engine: platform: move Host_Minimize_f into platform code

This commit is contained in:
Alibek Omarov
2025-05-11 15:24:52 +03:00
parent a479099804
commit 6ccafbe297
6 changed files with 23 additions and 12 deletions
+5
View File
@@ -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
+5
View File
@@ -28,6 +28,11 @@ struct fb_s
#define DEFAULT_FBDEV "/dev/fb0"
void Platform_Minimize_f( void )
{
// stub
}
/*
========================
Android_SwapBuffers
+1 -1
View File
@@ -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 );
//
+5
View File
@@ -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;
+6
View File
@@ -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;