Skip to content

Commit

Permalink
Fix Win32 build and fix x & y position on Borderless Fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MadDeCoDeR committed Nov 14, 2024
1 parent 75ca1fc commit 4885d35
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doomclassic/doom/p_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ void P_CreateSecNodeList(mobj_t* thing, fixed_t x, fixed_t y)
// finished, delete all nodes where m_thing is still NULL. These
// represent the sectors the Thing has vacated.

for (int i = 0; i < ::g->sector_list.size(); i++)
for (size_t i = 0; i < ::g->sector_list.size(); i++)
{
msecnode_t* node = ::g->sector_list[i].get();
if (node != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion doomclassic/doom/p_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ void T_Scroll(scroll_t *s)
::g->sectors[sec->heightsec].floorheight > height ?
::g->sectors[sec->heightsec].floorheight : MININT;

for (int i = 0; i < ::g->sector_list.size(); i++) {
for (size_t i = 0; i < ::g->sector_list.size(); i++) {
msecnode_t* node = ::g->sector_list[i].get();
if (node != NULL) {
if (node->m_sector == sec) {
Expand Down
10 changes: 8 additions & 2 deletions neo/renderer/RenderSystem_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,14 @@ void R_SetNewMode( const bool fullInit )
{
swf_cursorDPI.SetFloat(1.0f);// GK: Since it is in windowed Mode (or Borderless mode) reset the scale to 1
// use explicit position / size for window
parms.x = r_windowX.GetInteger() >= 0 ? r_windowX.GetInteger() : 0;
parms.y = r_windowY.GetInteger() >= 0 ? r_windowY.GetInteger() : 0;
if (r_fullscreen.GetInteger() == 0) {
parms.x = r_windowX.GetInteger() >= 0 ? r_windowX.GetInteger() : 0;
parms.y = r_windowY.GetInteger() >= 0 ? r_windowY.GetInteger() : 0;
}
else {
parms.x = 0;
parms.y = 0;
}
parms.width = R_CalculateResolution(false, modeList);
parms.height = R_CalculateResolution(true, modeList);
// may still be -1 to force a borderless window
Expand Down

0 comments on commit 4885d35

Please sign in to comment.