forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue