<commit_before>﻿// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

using osu.Framework.Input;
using osu.Framework.Platform;

namespace osu.Framework.Configuration
{
    public class FrameworkConfigManager : ConfigManager<FrameworkSetting>
    {
        protected override string Filename => @"framework.ini";

        protected override void InitialiseDefaults()
        {
            Set(FrameworkSetting.ShowLogOverlay, true);

            Set(FrameworkSetting.Width, 1366, 640);
            Set(FrameworkSetting.Height, 768, 480);
            Set(FrameworkSetting.ConfineMouseMode, ConfineMouseMode.Fullscreen);
            Set(FrameworkSetting.WindowedPositionX, 0.5, -0.1, 1.1);
            Set(FrameworkSetting.WindowedPositionY, 0.5, -0.1, 1.1);
            Set(FrameworkSetting.AudioDevice, string.Empty);
            Set(FrameworkSetting.VolumeUniversal, 1.0, 0.0, 1.0);
            Set(FrameworkSetting.VolumeMusic, 1.0, 0.0, 1.0);
            Set(FrameworkSetting.VolumeEffect, 1.0, 0.0, 1.0);
            Set(FrameworkSetting.WidthFullscreen, 9999, 320, 9999);
            Set(FrameworkSetting.HeightFullscreen, 9999, 240, 9999);
            Set(FrameworkSetting.Letterboxing, true);
            Set(FrameworkSetting.LetterboxPositionX, 0.0, -1.0, 1.0);
            Set(FrameworkSetting.LetterboxPositionY, 0.0, -1.0, 1.0);
            Set(FrameworkSetting.FrameSync, FrameSync.Limit2x);
            Set(FrameworkSetting.WindowMode, WindowMode.Windowed);
            Set(FrameworkSetting.ShowUnicode, false);
            Set(FrameworkSetting.ActiveInputHandlers, string.Empty);
            Set(FrameworkSetting.CursorSensitivity, 1.0, 0, 10);
            Set(FrameworkSetting.Locale, string.Empty);
        }

        public FrameworkConfigManager(Storage storage)
            : base(storage)
        {
        }
    }

    public enum FrameworkSetting
    {
        ShowLogOverlay,

        AudioDevice,
        VolumeUniversal,
        VolumeEffect,
        VolumeMusic,

        Width,
        Height,<commit_msg>Better min/max range for cursor sensitivity<commit_after>﻿// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

using osu.Framework.Input;
using osu.Framework.Platform;

namespace osu.Framework.Configuration
{
    public class FrameworkConfigManager : ConfigManager<FrameworkSetting>
    {
        protected override string Filename => @"framework.ini";

        protected override void InitialiseDefaults()
        {
            Set(FrameworkSetting.ShowLogOverlay, true);

            Set(FrameworkSetting.Width, 1366, 640);
            Set(FrameworkSetting.Height, 768, 480);
            Set(FrameworkSetting.ConfineMouseMode, ConfineMouseMode.Fullscreen);
            Set(FrameworkSetting.WindowedPositionX, 0.5, -0.1, 1.1);
            Set(FrameworkSetting.WindowedPositionY, 0.5, -0.1, 1.1);
            Set(FrameworkSetting.AudioDevice, string.Empty);
            Set(FrameworkSetting.VolumeUniversal, 1.0, 0.0, 1.0);
            Set(FrameworkSetting.VolumeMusic, 1.0, 0.0, 1.0);
            Set(FrameworkSetting.VolumeEffect, 1.0, 0.0, 1.0);
            Set(FrameworkSetting.WidthFullscreen, 9999, 320, 9999);
            Set(FrameworkSetting.HeightFullscreen, 9999, 240, 9999);
            Set(FrameworkSetting.Letterboxing, true);
            Set(FrameworkSetting.LetterboxPositionX, 0.0, -1.0, 1.0);
            Set(FrameworkSetting.LetterboxPositionY, 0.0, -1.0, 1.0);
            Set(FrameworkSetting.FrameSync, FrameSync.Limit2x);
            Set(FrameworkSetting.WindowMode, WindowMode.Windowed);
            Set(FrameworkSetting.ShowUnicode, false);
            Set(FrameworkSetting.ActiveInputHandlers, string.Empty);
            Set(FrameworkSetting.CursorSensitivity, 1.0, 0.1, 6);
            Set(FrameworkSetting.Locale, string.Empty);
        }

        public FrameworkConfigManager(Storage storage)
            : base(storage)
        {
        }
    }

    public enum FrameworkSetting
    {
        ShowLogOverlay,

        AudioDevice,
        VolumeUniversal,
        VolumeEffect,
        VolumeMusic,

        Width,
        Height,
{'fraction_non_alphanumeric': 0.1057535522944328, 'fraction_numerical': 0.04239459585371535, 'mean_word_length': 2.5370675453047777, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5007607', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1187, 'n_words': 226}