|
@ -639,8 +639,8 @@ public class Game : GameWindow { |
|
|
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\totte-output\2023\07\31");
|
|
|
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\totte-output\2023\07\31");
|
|
|
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\import");
|
|
|
// string[] files = Directory.GetFiles(@"c:\users\colin\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\many-birds\"); |
|
|
|
|
|
|
|
|
string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\Germany all\104D7000"); |
|
|
|
|
|
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\many-birds\");
|
|
|
|
|
|
|
|
|
for (int i = 0; i < files.Count(); i++) { |
|
|
for (int i = 0; i < files.Count(); i++) { |
|
|
string file = files[i]; |
|
|
string file = files[i]; |
|
@ -669,6 +669,7 @@ public class Game : GameWindow { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void UnloadImages() { |
|
|
private void UnloadImages() { |
|
|
|
|
|
return; |
|
|
// Unload images that haven't been touched in a while.
|
|
|
// Unload images that haven't been touched in a while.
|
|
|
// FIXME: keep around thumbnail-sized textures?
|
|
|
// FIXME: keep around thumbnail-sized textures?
|
|
|
lock (loadedImagesLock) { |
|
|
lock (loadedImagesLock) { |
|
@ -704,7 +705,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 - 30); |
|
|
int minLoadedImage = Math.Max(0, photoIndex - 30); |
|
|
int maxLoadedImage = Math.Min(photoIndex + 30, photos.Count - 1); |
|
|
|
|
|
|
|
|
// int maxLoadedImage = Math.Min(photoIndex + 30, photos.Count - 1);
|
|
|
|
|
|
int maxLoadedImage = 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) { |
|
|