|
|
@@ -113,6 +113,7 @@ Win32Core::Win32Core(PolycodeViewBase *view, int _xRes, int _yRes, bool fullScre
|
|
|
eventMutex = createMutex();
|
|
|
|
|
|
isFullScreen = fullScreen;
|
|
|
+ this->resizable = view->resizable;
|
|
|
|
|
|
renderer = new OpenGLRenderer();
|
|
|
services->setRenderer(renderer);
|
|
|
@@ -171,7 +172,9 @@ void Win32Core::captureMouse(bool newval) {
|
|
|
|
|
|
GetClientRect(core->hWnd, &crect);
|
|
|
arect = crect;
|
|
|
- AdjustWindowRectEx(&arect, WS_CAPTION | WS_BORDER, FALSE, 0);
|
|
|
+ if (!fullScreen){
|
|
|
+ AdjustWindowRectEx(&arect, WS_CAPTION | WS_BORDER, FALSE, 0);
|
|
|
+ }
|
|
|
|
|
|
rect.left += (crect.left - arect.left);
|
|
|
rect.right += (crect.right - arect.right);
|
|
|
@@ -268,8 +271,13 @@ void Win32Core::setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, in
|
|
|
rect.top = 0;
|
|
|
rect.right = xRes;
|
|
|
rect.bottom = yRes;
|
|
|
- SetWindowLongPtr(hWnd, GWL_STYLE, WS_CAPTION | WS_POPUPWINDOW | WS_VISIBLE);
|
|
|
- AdjustWindowRect(&rect, WS_CAPTION | WS_POPUPWINDOW, FALSE);
|
|
|
+ if (resizable){
|
|
|
+ SetWindowLongPtr(hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW | WS_SYSMENU | WS_VISIBLE);
|
|
|
+ AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW | WS_SYSMENU, FALSE);
|
|
|
+ } else {
|
|
|
+ SetWindowLongPtr(hWnd, GWL_STYLE, WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE);
|
|
|
+ AdjustWindowRect(&rect, WS_CAPTION | WS_POPUP | WS_SYSMENU, FALSE);
|
|
|
+ }
|
|
|
MoveWindow(hWnd, 0, 0, rect.right-rect.left, rect.bottom-rect.top, TRUE);
|
|
|
|
|
|
ChangeDisplaySettings(0, 0);
|
|
|
@@ -1065,11 +1073,12 @@ std::vector<Polycode::Rectangle> Win32Core::getVideoModes() {
|
|
|
|
|
|
String Win32Core::executeExternalCommand(String command, String args, String inDirectory) {
|
|
|
String execInDirectory = inDirectory;
|
|
|
+
|
|
|
if(inDirectory == "") {
|
|
|
execInDirectory = defaultWorkingDirectory;
|
|
|
}
|
|
|
|
|
|
- String cmdString = "cd \""+execInDirectory+"\" & "+command+" "+args;
|
|
|
+ String cmdString = inDirectory.substr(0, inDirectory.find_first_of(":")+1)+" & cd \"" + execInDirectory + "\" & " + command + " " + args;
|
|
|
|
|
|
char psBuffer[128];
|
|
|
FILE *pPipe;
|