change settings to ones sensible for my new desktop
This commit is contained in:
parent
4ce32172f9
commit
ce4a726a03
24
Program.cs
24
Program.cs
@ -353,7 +353,7 @@ public class UiGeometry {
|
|||||||
public UiGeometry(Vector2i windowSize, int starSize) {
|
public UiGeometry(Vector2i windowSize, int starSize) {
|
||||||
WindowSize = windowSize;
|
WindowSize = windowSize;
|
||||||
|
|
||||||
int numThumbnailsPerColumn = Math.Max(WindowSize.Y / 100, 1);
|
int numThumbnailsPerColumn = Math.Max(WindowSize.Y / 120, 1);
|
||||||
int thumbnailHeight = WindowSize.Y / numThumbnailsPerColumn;
|
int thumbnailHeight = WindowSize.Y / numThumbnailsPerColumn;
|
||||||
int thumbnailWidth = (int) (1.0 * thumbnailHeight * CameraInfo.AspectRatio);
|
int thumbnailWidth = (int) (1.0 * thumbnailHeight * CameraInfo.AspectRatio);
|
||||||
ThumbnailSize = new(thumbnailWidth, thumbnailHeight);
|
ThumbnailSize = new(thumbnailWidth, thumbnailHeight);
|
||||||
@ -523,8 +523,8 @@ public class Game : GameWindow {
|
|||||||
geometry = new UiGeometry(nwSettings.Size, STAR_FILLED.Size.X);
|
geometry = new UiGeometry(nwSettings.Size, STAR_FILLED.Size.X);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string outputRoot = @"c:\users\colin\desktop\totte-output";
|
// private static string outputRoot = @"c:\users\colin\desktop\totte-output";
|
||||||
// private static string outputRoot = @"c:\users\colin\pictures\photos";
|
private static string outputRoot = @"d:\photos";
|
||||||
|
|
||||||
private static Texture TEXTURE_WHITE = new(new Image<Rgba32>(1, 1, new Rgba32(255, 255, 255)));
|
private static Texture TEXTURE_WHITE = new(new Image<Rgba32>(1, 1, new Rgba32(255, 255, 255)));
|
||||||
private static Texture TEXTURE_BLACK = new(new Image<Rgba32>(1, 1, new Rgba32(0, 0, 0)));
|
private static Texture TEXTURE_BLACK = new(new Image<Rgba32>(1, 1, new Rgba32(0, 0, 0)));
|
||||||
@ -589,9 +589,9 @@ public class Game : GameWindow {
|
|||||||
} else {
|
} else {
|
||||||
timeSinceEvent += e.Time;
|
timeSinceEvent += e.Time;
|
||||||
}
|
}
|
||||||
if (IsFocused && timeSinceEvent < 1) {
|
if (IsFocused) { // && timeSinceEvent < 1
|
||||||
RenderFrequency = 30;
|
RenderFrequency = 60;
|
||||||
UpdateFrequency = 30;
|
UpdateFrequency = 60;
|
||||||
} else {
|
} else {
|
||||||
RenderFrequency = 5;
|
RenderFrequency = 5;
|
||||||
UpdateFrequency = 5;
|
UpdateFrequency = 5;
|
||||||
@ -847,7 +847,7 @@ public class Game : GameWindow {
|
|||||||
// string[] files = Directory.GetFiles(@"c:\users\colin\pictures\photos\2023\09\06\jpg");
|
// string[] files = Directory.GetFiles(@"c:\users\colin\pictures\photos\2023\09\06\jpg");
|
||||||
// string[] files = Directory.GetFiles(@"G:\DCIM\100EOSR6\");
|
// string[] files = Directory.GetFiles(@"G:\DCIM\100EOSR6\");
|
||||||
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\totte-output\2023\08\03");
|
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\totte-output\2023\08\03");
|
||||||
string[] files = Directory.GetFiles(@"c:\users\colin\desktop\import");
|
string[] files = Directory.GetFiles(@"c:\users\colin\OneDrive\desktop\import");
|
||||||
// string[] files = Directory.GetFiles(@"C:\Users\colin\Pictures\photos\2018\06\23");
|
// string[] files = Directory.GetFiles(@"C:\Users\colin\Pictures\photos\2018\06\23");
|
||||||
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\Germany all\104D7000");
|
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\Germany all\104D7000");
|
||||||
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\many-birds\");
|
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\many-birds\");
|
||||||
@ -898,7 +898,7 @@ public class Game : GameWindow {
|
|||||||
private void UnloadImages() {
|
private void UnloadImages() {
|
||||||
// Unload images that haven't been touched in a while.
|
// Unload images that haven't been touched in a while.
|
||||||
lock (loadedImagesLock) {
|
lock (loadedImagesLock) {
|
||||||
while (loadedImages.Count > 20) {
|
while (loadedImages.Count > 500) {
|
||||||
long earliestTime = long.MaxValue;
|
long earliestTime = long.MaxValue;
|
||||||
Photo? earliest = null;
|
Photo? earliest = null;
|
||||||
foreach (Photo photo in loadedImages) {
|
foreach (Photo photo in loadedImages) {
|
||||||
@ -927,8 +927,8 @@ public class Game : GameWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Start loading any images that are in our window but not yet loaded.
|
// Start loading any images that are in our window but not yet loaded.
|
||||||
int minLoadedImage = Math.Max(0, photoIndex - 5);
|
int minLoadedImage = Math.Max(0, photoIndex - 100);
|
||||||
int maxLoadedImage = Math.Min(photoIndex + 10, photos.Count - 1);
|
int maxLoadedImage = Math.Min(photoIndex + 300, photos.Count - 1);
|
||||||
List<Photo> toLoad = new();
|
List<Photo> toLoad = new();
|
||||||
for (int i = minLoadedImage; i <= maxLoadedImage; i++) {
|
for (int i = minLoadedImage; i <= maxLoadedImage; i++) {
|
||||||
lock (loadedImagesLock) {
|
lock (loadedImagesLock) {
|
||||||
@ -1268,8 +1268,8 @@ static class Program {
|
|||||||
Console.WriteLine(
|
Console.WriteLine(
|
||||||
$"best monitor: {bestMonitor.HorizontalResolution}x{bestMonitor.VerticalResolution}");
|
$"best monitor: {bestMonitor.HorizontalResolution}x{bestMonitor.VerticalResolution}");
|
||||||
GameWindowSettings gwSettings = new();
|
GameWindowSettings gwSettings = new();
|
||||||
gwSettings.UpdateFrequency = 30.0;
|
gwSettings.UpdateFrequency = 60.0;
|
||||||
gwSettings.RenderFrequency = 30.0;
|
gwSettings.RenderFrequency = 60.0;
|
||||||
|
|
||||||
NativeWindowSettings nwSettings = new();
|
NativeWindowSettings nwSettings = new();
|
||||||
nwSettings.WindowState = WindowState.Normal;
|
nwSettings.WindowState = WindowState.Normal;
|
||||||
|
Loading…
Reference in New Issue
Block a user