Skip to content

Commit cb79393

Browse files
committed
fi(lang): fixed language launch option
fix(focus): fixed focus on cs
1 parent 50d6a2b commit cb79393

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Docs/README_ru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
## Параметры запуска
5555
* `--show` - Показывать окно настроек при запуске приложения
5656
* `--maximized` - Сделать так, чтобы окно настроек всегда открывалось развернутым
57-
* `--language [название языка]` - Изменить язык приложения на указанный, настройки не изменяются
57+
* `--language [название языка]` - Изменить язык приложения на указанный (например en,ru), настройки не изменяются
5858
* `--portable` - Запуск приложения в портативном режиме
5959
* `--log` - Включение ведения журнала, независимо от того, включено ли оно в настройках, не изменяет настройки
6060
* `--cs` - Запустить кс вместе с CSAuto

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Or have you ever forgotten to buy armor or defuse kit as ct?
5454
## Launch Options
5555
* `--show` - Show settings window on application startup
5656
* `--maximized` - Make settings window always start maximized
57-
* `--language [language name]` - Change app language to the one specified, doesn't change the settings
57+
* `--language [language name]` - Change app language to the one specified (e.g en,ru), doesn't change the settings
5858
* `--portable` - Run the app in portable mode
5959
* `--log` - Enabling logging, regardless of whether it is enabled in the settings, doesn't change the settings
6060
* `--cs` - Launch cs with CSAuto

src/CSAuto/App.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ protected override void OnStartup(StartupEventArgs e)
7979
break;
8080
}
8181
}
82-
CultureInfo.CurrentUICulture = CultureInfo.GetCultureInfo(Settings.Default.currentLanguage);
82+
CultureInfo.CurrentUICulture = CultureInfo.GetCultureInfo(
83+
languageName ?? Settings.Default.currentLanguage);
8384

8485
base.OnStartup(e);
8586

src/CSAuto/MainApp.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public partial class MainApp : Window
4141
#region Constants
4242
public const string VER = "2.1.0";
4343
public const string FULL_VER = VER + (DEBUG_REVISION == "" ? "" : " REV "+ DEBUG_REVISION);
44-
const string DEBUG_REVISION = "7";
44+
const string DEBUG_REVISION = "8";
4545
const string GAME_PROCCES_NAME = "cs2";
4646
const string GAME_WINDOW_NAME = "Counter-Strike 2";
4747
const string GAME_CLASS_NAME = "SDL_app";
@@ -932,7 +932,7 @@ private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref b
932932
{
933933
if (Properties.Settings.Default.autoFocusOnCS &&
934934
Properties.Settings.Default.autoAcceptMatch &&
935-
csProcess != null && !csActive &&
935+
csProcess != null && !csActive && inLobby == true &&
936936
lParam == csProcess.MainWindowHandle && wParam == NativeMethods.HSHELL_FLASH)
937937
{
938938
if (Properties.Settings.Default.focusBackOnOriginalWindow)

0 commit comments

Comments
 (0)