Skip to content

Commit bb8c359

Browse files
committed
Merge branch 'master' into release
2 parents a7e78f2 + 186e22b commit bb8c359

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+664
-587
lines changed

makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ MIN_NUGET_VERSION:= "2.16.0"
66
NUGET_VERSION:= $(shell nuget help 2> /dev/null | awk '/Version:/ { print $$3; exit 0}')
77
GreaterVersion = $(shell printf '%s\n' $(1) $(2) | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr | head -n 1)
88
PROGRAM_VERSION = $(shell git describe --tags --exact-match 2> /dev/null)
9+
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
910

1011
# Directories
1112
DEBUG_DIR := bin_debug
@@ -209,5 +210,5 @@ ifeq (, $(PROGRAM_VERSION))
209210
else
210211
@echo This is a $(COLOR_YELLOW)Tagged Release build$(COLOR_END)
211212
@echo Final filename: $(COLOR_RED)OpenBVE-$(PROGRAM_VERSION).deb(COLOR_END)
212-
@mv installers/debian.deb OpenBVE-$(PROGRAM_VERSION).deb
213+
@mv "$(ROOT_DIR)/installers/debian.deb" OpenBVE-$(PROGRAM_VERSION).deb
213214
endif

source/LibRender2/Menu/MenuEntries/MenuOption.cs

+7
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ public void Flip()
160160
DisplayDevice.Default.ChangeResolution(currentResolution);
161161
BaseMenu.Renderer.SetWindowState(WindowState.Fullscreen);
162162
BaseMenu.Renderer.SetWindowSize((int)(currentResolution.Width * DisplayDevice.Default.ScaleFactor.X), (int)(currentResolution.Height * DisplayDevice.Default.ScaleFactor.Y));
163+
BaseMenu.CurrentOptions.FullscreenWidth = currentResolution.Width;
164+
BaseMenu.CurrentOptions.FullscreenHeight = currentResolution.Height;
163165
return;
164166
}
165167
catch
@@ -169,6 +171,11 @@ public void Flip()
169171
}
170172
}
171173
}
174+
else
175+
{
176+
BaseMenu.CurrentOptions.WindowWidth = res.Width;
177+
BaseMenu.CurrentOptions.WindowHeight = res.Height;
178+
}
172179
BaseMenu.ComputePosition();
173180
break;
174181
case OptionType.FullScreen:

source/ObjectViewer/InterfaceS.cs

+1-56
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using System.Collections.Generic;
2-
using ObjectViewer.Graphics;
3-
using OpenBveApi;
4-
using OpenBveApi.Input;
52
using OpenBveApi.Interface;
63
using OpenBveApi.Objects;
74
using TrainManager.Trains;
@@ -42,59 +39,7 @@ internal static class Interface {
4239
internal static void AddMessage(MessageType Type, bool FileNotFound, string Text) {
4340
LogMessages.Add(new LogMessage(Type, FileNotFound, Text));
4441
}
45-
/// <summary>Holds the program specific options</summary>
46-
internal class Options : BaseOptions
47-
{
48-
private ObjectOptimizationMode objectOptimizationMode;
49-
50-
internal string ObjectSearchDirectory;
51-
52-
internal Key CameraMoveLeft;
53-
54-
internal Key CameraMoveRight;
55-
56-
internal Key CameraMoveUp;
57-
58-
internal Key CameraMoveDown;
59-
60-
internal Key CameraMoveForward;
61-
62-
internal Key CameraMoveBackward;
63-
64-
/// <summary>
65-
/// The mode of optimization to be performed on an object
66-
/// </summary>
67-
internal ObjectOptimizationMode ObjectOptimizationMode
68-
{
69-
get => objectOptimizationMode;
70-
set
71-
{
72-
objectOptimizationMode = value;
73-
74-
switch (value)
75-
{
76-
case ObjectOptimizationMode.None:
77-
ObjectOptimizationBasicThreshold = 0;
78-
ObjectOptimizationFullThreshold = 0;
79-
break;
80-
case ObjectOptimizationMode.Low:
81-
ObjectOptimizationBasicThreshold = 1000;
82-
ObjectOptimizationFullThreshold = 250;
83-
break;
84-
case ObjectOptimizationMode.High:
85-
ObjectOptimizationBasicThreshold = 10000;
86-
ObjectOptimizationFullThreshold = 1000;
87-
break;
88-
}
89-
}
90-
}
91-
92-
internal Options()
93-
{
94-
ObjectOptimizationMode = ObjectOptimizationMode.Low;
95-
}
96-
}
97-
42+
9843
/// <summary>The current options in use</summary>
9944
internal static Options CurrentOptions;
10045
}

0 commit comments

Comments
 (0)