|
|
@ -353,7 +353,7 @@ public class UiGeometry { |
|
|
|
public UiGeometry(Vector2i windowSize, int starSize) { |
|
|
|
WindowSize = windowSize; |
|
|
|
|
|
|
|
int numThumbnailsPerColumn = Math.Max(WindowSize.Y / 100, 1); |
|
|
|
int numThumbnailsPerColumn = Math.Max(WindowSize.Y / 120, 1); |
|
|
|
int thumbnailHeight = WindowSize.Y / numThumbnailsPerColumn; |
|
|
|
int thumbnailWidth = (int) (1.0 * thumbnailHeight * CameraInfo.AspectRatio); |
|
|
|
ThumbnailSize = new(thumbnailWidth, thumbnailHeight); |
|
|
@ -523,8 +523,8 @@ public class Game : GameWindow { |
|
|
|
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\pictures\photos";
|
|
|
|
// private static string outputRoot = @"c:\users\colin\desktop\totte-output";
|
|
|
|
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_BLACK = new(new Image<Rgba32>(1, 1, new Rgba32(0, 0, 0))); |
|
|
@ -589,9 +589,9 @@ public class Game : GameWindow { |
|
|
|
} else { |
|
|
|
timeSinceEvent += e.Time; |
|
|
|
} |
|
|
|
if (IsFocused && timeSinceEvent < 1) { |
|
|
|
RenderFrequency = 30; |
|
|
|
UpdateFrequency = 30; |
|
|
|
if (IsFocused) { // && timeSinceEvent < 1
|
|
|
|
RenderFrequency = 60; |
|
|
|
UpdateFrequency = 60; |
|
|
|
} else { |
|
|
|
RenderFrequency = 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(@"G:\DCIM\100EOSR6\");
|
|
|
|
// 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\Desktop\Germany all\104D7000");
|
|
|
|
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\many-birds\");
|
|
|
@ -898,7 +898,7 @@ public class Game : GameWindow { |
|
|
|
private void UnloadImages() { |
|
|
|
// Unload images that haven't been touched in a while.
|
|
|
|
lock (loadedImagesLock) { |
|
|
|
while (loadedImages.Count > 20) { |
|
|
|
while (loadedImages.Count > 500) { |
|
|
|
long earliestTime = long.MaxValue; |
|
|
|
Photo? earliest = null; |
|
|
|
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.
|
|
|
|
int minLoadedImage = Math.Max(0, photoIndex - 5); |
|
|
|
int maxLoadedImage = Math.Min(photoIndex + 10, photos.Count - 1); |
|
|
|
int minLoadedImage = Math.Max(0, photoIndex - 100); |
|
|
|
int maxLoadedImage = Math.Min(photoIndex + 300, photos.Count - 1); |
|
|
|
List<Photo> toLoad = new(); |
|
|
|
for (int i = minLoadedImage; i <= maxLoadedImage; i++) { |
|
|
|
lock (loadedImagesLock) { |
|
|
@ -1268,8 +1268,8 @@ static class Program { |
|
|
|
Console.WriteLine( |
|
|
|
$"best monitor: {bestMonitor.HorizontalResolution}x{bestMonitor.VerticalResolution}"); |
|
|
|
GameWindowSettings gwSettings = new(); |
|
|
|
gwSettings.UpdateFrequency = 30.0; |
|
|
|
gwSettings.RenderFrequency = 30.0; |
|
|
|
gwSettings.UpdateFrequency = 60.0; |
|
|
|
gwSettings.RenderFrequency = 60.0; |
|
|
|
|
|
|
|
NativeWindowSettings nwSettings = new(); |
|
|
|
nwSettings.WindowState = WindowState.Normal; |
|
|
|