Final Burn Neo > FBN Development

Window size

(1/1)

Death Metal:
Good morrow to thee, fine sires! Shall I humbly request a piece of thy wisdom? :p

Well, I'd like to ask you guys something, if anyone knows. Currently, FBA analyzes the size of the available visible area in order to fix a mixmum size to its main window, so the window will never be bigger than the screen (as in, its borders will never cross the screen edges). Now, would anyone know how to change it so that this feature is cancelled? I mean, I'd like to make it just like Kawaks in regards to the window size: if you set it to be 4 times bigger, then the window will be gigantic regardless of the the screen size/resolution of your desktop. I've already tried many things, but I've not been successful.

I know it might sound pointless to change the functionality of such a feature, but I'd really like to try it if possible.

Thanks in advance. :wink:

Death Metal:
As it's been slow as hell lately, I was analyzing a few old topics and thought that perhaps I should bump this one to see if you guys can help me, since I never figured this out. Please read above if you may.

Also, another unrelated question: does anyone know how far are we in emulating those original M1 ROMs in Neo-Geo sets, instead of using decrypted ones?

Unfortunately I'm merely an expectator in the scene, since I don't have all the required programming knowledge to really help out. :(

Thanks.

Leaf:
maby it's helpful to you. :smilie:

modify ScrnSize() in scrn.cpp,

--- Code: --- // Find the width and height
w = nScrnWidth;
h = nScrnHeight;

// Find out how much space is taken up by the borders
ew = GetSystemMetrics(SM_CXSIZEFRAME) << 1;
eh = GetSystemMetrics(SM_CYSIZEFRAME) << 1;

if (bMenuEnabled) {
eh += GetSystemMetrics(SM_CYCAPTION);
eh += nMenuHeight;
} else {
eh += 1 << 1;
ew += 1 << 1;
}

if (bMenuEnabled || !bVidScanlines || nVidSelect == 2) {
// Subtract the border space
w -= ew;
h -= eh;
}

if (bVidCorrectAspect || bVidFullStretch && !(nVidSelect == 2 && (nVidBlitterOpt[2] & 0x0100) == 0)) {
int ww = w;
int hh = h;

// do {
if (nBmapWidth < nBmapHeight && bVidScanRotate) {
// if (ww > nBmapWidth * nMaxSize) {
ww = nBmapWidth * nMaxSize;
// }
// if (hh > ww * nVidScrnAspectX * nGameAspectY * nScrnHeight / (nScrnWidth * nVidScrnAspectY * nGameAspectX)) {
hh = ww * nVidScrnAspectX * nGameAspectY * nScrnHeight / (nScrnWidth * nVidScrnAspectY * nGameAspectX);
// }
} else {
// if (hh > nBmapHeight * nMaxSize) {
hh = nBmapHeight * nMaxSize;
// }
// if (ww > hh * nVidScrnAspectY * nGameAspectX * nScrnWidth / (nScrnHeight * nVidScrnAspectX * nGameAspectY)) {
ww = hh * nVidScrnAspectY * nGameAspectX * nScrnWidth / (nScrnHeight * nVidScrnAspectX * nGameAspectY);
// }
}
// } while ((ww > w || hh > h) && nMaxSize-- > 1);
w = ww;
h = hh;
} else {
// while ((nBmapWidth * nMaxSize > w || nBmapHeight * nMaxSize > h) && nMaxSize > 1) {
// nMaxSize--;
// }

// if (w > nBmapWidth * nMaxSize || h > nBmapHeight * nMaxSize) {
w = nBmapWidth * nMaxSize;
h = nBmapHeight * nMaxSize;
// }
}

RECT rect = { 0, 0, w, h };
VidImageSize(&rect, nBmapWidth, nBmapHeight);
w = rect.right - rect.left + ew;
h = rect.bottom - rect.top + eh;

x = nWindowPosX; y = nWindowPosY;
/* if (x + w > SystemWorkArea.right || y + h > SystemWorkArea.bottom) {
// Find the midpoint for the window
x = SystemWorkArea.left + SystemWorkArea.right;
x /= 2;
y = SystemWorkArea.bottom + SystemWorkArea.top;
y /= 2;

x -= w / 2;
y -= h / 2;
}
*/
MenuUpdate();

bMaximised = false;

MoveWindow(hScrnWnd, x, y, w, h, true);
// SetWindowPos(hScrnWnd, NULL, x, y, w, h, SWP_NOREDRAW | SWP_NOACTIVATE | SWP_NOSENDCHANGING | SWP_NOZORDER);

// nWindowPosX = x; nWindowPosY = y;

  return 0;

--- End code ---

modify the vidInit() in vid_d3d.cpp,

--- Code: --- // Set up the display mode
if (nVidFullscreen) {
int nZoomlevel;
if (nVidBlitterOpt[nVidSelect] & 0x04000000) {
nZoomlevel = nPreScaleZoom;
} else {
nZoomlevel = nScreenSize;
}
if (VidSEnterFullscreenMode(nZoomlevel, 0)) {
vidExit();
return 1;
}
} else {
RECT rect;

// SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);

GetClientScreenRect(hVidWnd, &rect);
rect.top += nMenuHeight; rect.bottom += nMenuHeight;

nVidScrnWidth = rect.right - rect.left;
nVidScrnHeight = rect.bottom - rect.top;

pDD->SetCooperativeLevel(hVidWnd, DDSCL_NORMAL);
}

--- End code ---

Death Metal:
I can't believe it was that simple! Wow, I do fail at life.

Thanks Leaf, it did work. :p

Navigation

[0] Message Index

Go to full version