Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Apps
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-02-20 01:39:51 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-02-20 01:39:51 +0300
commit855ec1bcd2ba2f060966e024aec732833d2eecee (patch)
tree5ed1244c172191548ac4ed0b15d5b9268333581e /Apps
parent59b9ef19e80411d98bff4bbd2f791fa1dae39e64 (diff)
Some fixes
Diffstat (limited to 'Apps')
-rw-r--r--Apps/NesMiniApplication.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Apps/NesMiniApplication.cs b/Apps/NesMiniApplication.cs
index 07e5d5b3..c5c8c6f5 100644
--- a/Apps/NesMiniApplication.cs
+++ b/Apps/NesMiniApplication.cs
@@ -24,7 +24,7 @@ namespace com.clusterrr.hakchi_gui
public static bool? NeedPatch;
public static bool? Need3rdPartyEmulator;
public static bool? NeedAutoDownloadCover;
- const int MaxCompressSize = 10 * 1024;
+ const int MaxCompressSize = 10 * 1024 * 1024;
public static string GamesDirectory
{
@@ -262,11 +262,11 @@ namespace com.clusterrr.hakchi_gui
{
var files = Directory.GetFiles(gamePath, "*.*", SearchOption.AllDirectories);
foreach (var f in files)
- try
- {
+ try
+ {
File.Delete(f);
- }
- catch { }
+ }
+ catch { }
}
Directory.CreateDirectory(gamePath);
File.WriteAllBytes(romPath, rawRomData);
@@ -384,7 +384,7 @@ namespace com.clusterrr.hakchi_gui
var sortRawTitle = Name.ToLower();
if (sortRawTitle.StartsWith("the "))
sortRawTitle = sortRawTitle.Substring(4); // Sorting without "THE"
- File.WriteAllText(ConfigPath,
+ File.WriteAllText(ConfigPath,
$"[Desktop Entry]\n" +
$"Type=Application\n" +
$"Exec={command}\n" +
@@ -514,14 +514,14 @@ namespace com.clusterrr.hakchi_gui
if (File.Exists(imagePath))
cover = LoadBitmap(imagePath);
}
- if( cover == null )
+ if (cover == null)
{
// do a bidirectional search on sanitized filenames to allow minor variance in filenames, also allows subdirectories
Regex rgx = new Regex("[^a-zA-Z0-9]", RegexOptions.Compiled);
var sanitizedName = rgx.Replace(name, string.Empty).ToLower();
var covers = Directory.GetFiles(artDirectory, "*.*", SearchOption.AllDirectories);
- foreach(var file in covers)
+ foreach (var file in covers)
{
var sanitized = rgx.Replace(System.IO.Path.GetFileNameWithoutExtension(file), "").ToLower();
if (sanitizedName.StartsWith(sanitized) || sanitized.StartsWith(sanitizedName))