mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
the whole game
This commit is contained in:
21
src/main_rpi.cpp
Executable file
21
src/main_rpi.cpp
Executable file
@@ -0,0 +1,21 @@
|
||||
//#include "main_rpi.h"
|
||||
|
||||
#include <SDL/SDL_syswm.h>
|
||||
|
||||
void getWindowPosition(int* x, int* y, int* width, int* height) {
|
||||
static SDL_SysWMinfo wmInfo;
|
||||
SDL_VERSION(&wmInfo.version);
|
||||
SDL_GetWMInfo(&wmInfo);
|
||||
|
||||
static XWindowAttributes attr;
|
||||
Display* display = wmInfo.info.x11.display;
|
||||
Window window = wmInfo.info.x11.wmwindow;
|
||||
Window wndvoid;
|
||||
|
||||
wmInfo.info.x11.lock_func();
|
||||
int status = XGetWindowAttributes(display, window, &attr);
|
||||
*width = attr.width;
|
||||
*height = attr.height;
|
||||
XTranslateCoordinates(display, window, attr.root, 0, 0, x, y, &wndvoid);
|
||||
wmInfo.info.x11.unlock_func();
|
||||
}
|
||||
Reference in New Issue
Block a user