/* mangohud-performance-page.c generated by valac 0.56.19, the Vala compiler
 * generated from mangohud-performance-page.vala, do not modify */

#include "protonplus_core.h"
#include <adwaita.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PROTON_PLUS_WIDGETS_MANGO_HUD_PERFORMANCE_PAGE_0_PROPERTY,
	PROTON_PLUS_WIDGETS_MANGO_HUD_PERFORMANCE_PAGE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_mango_hud_performance_page_properties[PROTON_PLUS_WIDGETS_MANGO_HUD_PERFORMANCE_PAGE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _ProtonPlusWidgetsMangoHudPerformancePagePrivate {
	AdwSwitchRow* fps_row;
	AdwSwitchRow* fps_avg_row;
	AdwSwitchRow* fps_limit_stats_row;
	AdwSwitchRow* frametime_row;
	AdwSwitchRow* frame_count_row;
	AdwSwitchRow* vps_row;
	AdwSwitchRow* ftrace_row;
	AdwComboRow* vsync_row;
	AdwComboRow* gl_vsync_row;
	AdwEntryRow* fps_limit_row;
	AdwEntryRow* fps_limit_offset_row;
	AdwSwitchRow* change_fps_limit_colors_row;
	GtkColorDialogButton* fps_limit_color_1_btn;
	GtkColorDialogButton* fps_limit_color_2_btn;
	GtkColorDialogButton* fps_limit_color_3_btn;
	AdwComboRow* fps_limit_method_row;
	AdwComboRow* toggle_fps_limit_row;
	AdwComboRow* picmip_row;
	GtkListBoxRow* af_row;
	GtkScale* af_scale;
	GtkListBoxRow* lod_bias_row;
	GtkScale* lod_bias_scale;
};

static gint ProtonPlusWidgetsMangoHudPerformancePage_private_offset;
static gpointer proton_plus_widgets_mango_hud_performance_page_parent_class = NULL;

static void __lambda252_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda252__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda253_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda253__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda254_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda254__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda255_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda255__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda256_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda256__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda257_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda257__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda258_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda258__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda259_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gint val);
static void ___lambda259__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda260_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gint val);
static void ___lambda260__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda261_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   const gchar* val);
static void ___lambda261__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                          gpointer self);
static void __lambda262_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   const gchar* val);
static void ___lambda262__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                          gpointer self);
static void __lambda263_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gboolean val);
static void ___lambda263__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void proton_plus_widgets_mango_hud_performance_page_refresh_fps_limit_color_btns (ProtonPlusWidgetsMangoHudPerformancePage* self);
static void proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors (ProtonPlusWidgetsMangoHudPerformancePage* self);
static void _proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors_g_object_notify (GObject* _sender,
                                                                                              GParamSpec* pspec,
                                                                                              gpointer self);
static void __lambda264_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gint val);
static void ___lambda264__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda265_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gint val);
static void ___lambda265__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda266_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   gint val);
static void ___lambda266__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda267_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   const gchar* val);
static void ___lambda267__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                          gpointer self);
static void __lambda268_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
                   const gchar* val);
static void ___lambda268__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                          gpointer self);
static void proton_plus_widgets_mango_hud_performance_page_real_refresh (ProtonPlusWidgetsMangoHudPage* base);
static void proton_plus_widgets_mango_hud_performance_page_finalize (GObject * obj);
static GType proton_plus_widgets_mango_hud_performance_page_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_widgets_mango_hud_performance_page_get_instance_private (ProtonPlusWidgetsMangoHudPerformancePage* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsMangoHudPerformancePage_private_offset);
}

static void
__lambda252_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_fps (_tmp1_, val);
}

static void
___lambda252__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda252_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda253_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_fps_avg (_tmp1_, val);
}

static void
___lambda253__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda253_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda254_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_fps_limit_stats (_tmp1_, val);
}

static void
___lambda254__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda254_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda255_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_frametime (_tmp1_, val);
}

static void
___lambda255__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda255_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda256_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_frame_count (_tmp1_, val);
}

static void
___lambda256__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda256_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda257_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_vps (_tmp1_, val);
}

static void
___lambda257__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda257_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda258_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_ftrace (_tmp1_, val);
}

static void
___lambda258__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda258_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
__lambda259_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gint val)
{
	switch (val) {
		case 0:
		{
			ProtonPlusUtilsMangoHudManager* _tmp0_;
			ProtonPlusUtilsMangoHudManager* _tmp1_;
			_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp1_ = _tmp0_;
			proton_plus_utils_mango_hud_manager_set_vsync (_tmp1_, "");
			break;
		}
		case 1:
		{
			ProtonPlusUtilsMangoHudManager* _tmp2_;
			ProtonPlusUtilsMangoHudManager* _tmp3_;
			_tmp2_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp3_ = _tmp2_;
			proton_plus_utils_mango_hud_manager_set_vsync (_tmp3_, "0");
			break;
		}
		case 2:
		{
			ProtonPlusUtilsMangoHudManager* _tmp4_;
			ProtonPlusUtilsMangoHudManager* _tmp5_;
			_tmp4_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp5_ = _tmp4_;
			proton_plus_utils_mango_hud_manager_set_vsync (_tmp5_, "1");
			break;
		}
		case 3:
		{
			ProtonPlusUtilsMangoHudManager* _tmp6_;
			ProtonPlusUtilsMangoHudManager* _tmp7_;
			_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp7_ = _tmp6_;
			proton_plus_utils_mango_hud_manager_set_vsync (_tmp7_, "2");
			break;
		}
		case 4:
		{
			ProtonPlusUtilsMangoHudManager* _tmp8_;
			ProtonPlusUtilsMangoHudManager* _tmp9_;
			_tmp8_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp9_ = _tmp8_;
			proton_plus_utils_mango_hud_manager_set_vsync (_tmp9_, "3");
			break;
		}
		default:
		break;
	}
}

static void
___lambda259__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda259_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda260_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gint val)
{
	switch (val) {
		case 0:
		{
			ProtonPlusUtilsMangoHudManager* _tmp0_;
			ProtonPlusUtilsMangoHudManager* _tmp1_;
			_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp1_ = _tmp0_;
			proton_plus_utils_mango_hud_manager_set_gl_vsync (_tmp1_, "");
			break;
		}
		case 1:
		{
			ProtonPlusUtilsMangoHudManager* _tmp2_;
			ProtonPlusUtilsMangoHudManager* _tmp3_;
			_tmp2_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp3_ = _tmp2_;
			proton_plus_utils_mango_hud_manager_set_gl_vsync (_tmp3_, "-1");
			break;
		}
		case 2:
		{
			ProtonPlusUtilsMangoHudManager* _tmp4_;
			ProtonPlusUtilsMangoHudManager* _tmp5_;
			_tmp4_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp5_ = _tmp4_;
			proton_plus_utils_mango_hud_manager_set_gl_vsync (_tmp5_, "0");
			break;
		}
		case 3:
		{
			ProtonPlusUtilsMangoHudManager* _tmp6_;
			ProtonPlusUtilsMangoHudManager* _tmp7_;
			_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp7_ = _tmp6_;
			proton_plus_utils_mango_hud_manager_set_gl_vsync (_tmp7_, "1");
			break;
		}
		default:
		break;
	}
}

static void
___lambda260__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda260_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda261_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              const gchar* val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	g_return_if_fail (val != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_fps_limit (_tmp1_, val);
}

static void
___lambda261__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                     gpointer self)
{
	__lambda261_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda262_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              const gchar* val)
{
	gint _tmp0_ = 0;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	ProtonPlusUtilsMangoHudManager* _tmp2_;
	g_return_if_fail (val != NULL);
	if (g_strcmp0 (val, "") != 0) {
		_tmp0_ = atoi (val);
	} else {
		_tmp0_ = 0;
	}
	_tmp1_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp2_ = _tmp1_;
	proton_plus_utils_mango_hud_manager_set_fps_limit_offset (_tmp2_, _tmp0_);
}

static void
___lambda262__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                     gpointer self)
{
	__lambda262_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda263_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_change_fps_limit_colors (_tmp1_, val);
}

static void
___lambda263__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda263_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
_proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors_g_object_notify (GObject* _sender,
                                                                                         GParamSpec* pspec,
                                                                                         gpointer self)
{
	proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors ((ProtonPlusWidgetsMangoHudPerformancePage*) self);
}

static void
__lambda264_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gint val)
{
	switch (val) {
		case 0:
		{
			ProtonPlusUtilsMangoHudManager* _tmp0_;
			ProtonPlusUtilsMangoHudManager* _tmp1_;
			_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp1_ = _tmp0_;
			proton_plus_utils_mango_hud_manager_set_fps_limit_method (_tmp1_, "late");
			break;
		}
		case 1:
		{
			ProtonPlusUtilsMangoHudManager* _tmp2_;
			ProtonPlusUtilsMangoHudManager* _tmp3_;
			_tmp2_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp3_ = _tmp2_;
			proton_plus_utils_mango_hud_manager_set_fps_limit_method (_tmp3_, "early");
			break;
		}
		default:
		break;
	}
}

static void
___lambda264__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda264_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda265_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gint val)
{
	switch (val) {
		case 0:
		{
			ProtonPlusUtilsMangoHudManager* _tmp0_;
			ProtonPlusUtilsMangoHudManager* _tmp1_;
			_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp1_ = _tmp0_;
			proton_plus_utils_mango_hud_manager_set_toggle_fps_limit (_tmp1_, "");
			break;
		}
		case 1:
		{
			ProtonPlusUtilsMangoHudManager* _tmp2_;
			ProtonPlusUtilsMangoHudManager* _tmp3_;
			_tmp2_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp3_ = _tmp2_;
			proton_plus_utils_mango_hud_manager_set_toggle_fps_limit (_tmp3_, "Shift_L+F1");
			break;
		}
		case 2:
		{
			ProtonPlusUtilsMangoHudManager* _tmp4_;
			ProtonPlusUtilsMangoHudManager* _tmp5_;
			_tmp4_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp5_ = _tmp4_;
			proton_plus_utils_mango_hud_manager_set_toggle_fps_limit (_tmp5_, "Shift_L+F2");
			break;
		}
		case 3:
		{
			ProtonPlusUtilsMangoHudManager* _tmp6_;
			ProtonPlusUtilsMangoHudManager* _tmp7_;
			_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp7_ = _tmp6_;
			proton_plus_utils_mango_hud_manager_set_toggle_fps_limit (_tmp7_, "Shift_L+F3");
			break;
		}
		case 4:
		{
			ProtonPlusUtilsMangoHudManager* _tmp8_;
			ProtonPlusUtilsMangoHudManager* _tmp9_;
			_tmp8_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp9_ = _tmp8_;
			proton_plus_utils_mango_hud_manager_set_toggle_fps_limit (_tmp9_, "Shift_L+F4");
			break;
		}
		default:
		break;
	}
}

static void
___lambda265__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda265_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda266_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              gint val)
{
	switch (val) {
		case 0:
		{
			ProtonPlusUtilsMangoHudManager* _tmp0_;
			ProtonPlusUtilsMangoHudManager* _tmp1_;
			_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp1_ = _tmp0_;
			proton_plus_utils_mango_hud_manager_set_picmip (_tmp1_, "");
			break;
		}
		case 1:
		{
			ProtonPlusUtilsMangoHudManager* _tmp2_;
			ProtonPlusUtilsMangoHudManager* _tmp3_;
			_tmp2_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp3_ = _tmp2_;
			proton_plus_utils_mango_hud_manager_set_picmip (_tmp3_, "0");
			break;
		}
		case 2:
		{
			ProtonPlusUtilsMangoHudManager* _tmp4_;
			ProtonPlusUtilsMangoHudManager* _tmp5_;
			_tmp4_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp5_ = _tmp4_;
			proton_plus_utils_mango_hud_manager_set_picmip (_tmp5_, "0");
			break;
		}
		case 3:
		{
			ProtonPlusUtilsMangoHudManager* _tmp6_;
			ProtonPlusUtilsMangoHudManager* _tmp7_;
			_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp7_ = _tmp6_;
			proton_plus_utils_mango_hud_manager_set_picmip (_tmp7_, "-1");
			break;
		}
		default:
		break;
	}
}

static void
___lambda266__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda266_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda267_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              const gchar* val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	g_return_if_fail (val != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_af (_tmp1_, val);
}

static void
___lambda267__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                     gpointer self)
{
	__lambda267_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

static void
__lambda268_ (ProtonPlusWidgetsMangoHudPerformancePage* self,
              const gchar* val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	g_return_if_fail (val != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_lod_bias (_tmp1_, val);
}

static void
___lambda268__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                     gpointer self)
{
	__lambda268_ ((ProtonPlusWidgetsMangoHudPerformancePage*) self, val);
}

ProtonPlusWidgetsMangoHudPerformancePage*
proton_plus_widgets_mango_hud_performance_page_construct (GType object_type,
                                                          ProtonPlusUtilsMangoHudManager* config)
{
	ProtonPlusWidgetsMangoHudPerformancePage * self = NULL;
	gboolean _tmp0_;
	gboolean _tmp1_;
	AdwSwitchRow* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	AdwSwitchRow* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	AdwSwitchRow* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	AdwSwitchRow* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	AdwSwitchRow* _tmp14_;
	gboolean _tmp15_;
	gboolean _tmp16_;
	AdwSwitchRow* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	AdwSwitchRow* _tmp20_;
	AdwSwitchRow* _tmp21_;
	GtkWidget* _tmp22_;
	AdwSwitchRow* _tmp23_;
	GtkWidget* _tmp24_;
	AdwSwitchRow* _tmp25_;
	GtkWidget* _tmp26_;
	AdwSwitchRow* _tmp27_;
	GtkWidget* _tmp28_;
	AdwSwitchRow* _tmp29_;
	GtkWidget* _tmp30_;
	AdwSwitchRow* _tmp31_;
	GtkWidget* _tmp32_;
	AdwSwitchRow* _tmp33_;
	GtkWidget* _tmp34_;
	GtkWidget** _tmp35_;
	GtkWidget** _tmp36_;
	gint _tmp36__length1;
	GtkFlowBox* _tmp37_;
	GtkFlowBox* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	gchar** _tmp44_;
	gchar** _tmp45_;
	gint _tmp45__length1;
	AdwComboRow* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	gchar** _tmp51_;
	gchar** _tmp52_;
	gint _tmp52__length1;
	AdwComboRow* _tmp53_;
	AdwComboRow* _tmp54_;
	GtkWidget* _tmp55_;
	AdwComboRow* _tmp56_;
	GtkWidget* _tmp57_;
	GtkWidget** _tmp58_;
	GtkWidget** _tmp59_;
	gint _tmp59__length1;
	GtkFlowBox* _tmp60_;
	GtkFlowBox* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	AdwEntryRow* _tmp64_;
	gint _tmp65_;
	gint _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
	AdwEntryRow* _tmp69_;
	GtkColorDialog* color_dialog = NULL;
	GtkColorDialog* _tmp70_;
	gboolean _tmp71_;
	gboolean _tmp72_;
	AdwSwitchRow* _tmp73_;
	GtkColorDialog* _tmp74_;
	GtkColorDialogButton* _tmp75_ = NULL;
	GtkColorDialog* _tmp76_;
	GtkColorDialogButton* _tmp77_ = NULL;
	GtkColorDialog* _tmp78_;
	GtkColorDialogButton* _tmp79_ = NULL;
	GtkBox* fps_limit_color_box = NULL;
	GtkBox* _tmp80_;
	GtkColorDialogButton* _tmp81_;
	GtkColorDialogButton* _tmp82_;
	GtkColorDialogButton* _tmp83_;
	AdwSwitchRow* _tmp84_;
	AdwSwitchRow* _tmp85_;
	GtkColorDialogButton* _tmp86_;
	GtkColorDialogButton* _tmp87_;
	GtkColorDialogButton* _tmp88_;
	gchar* _tmp89_;
	gchar* _tmp90_;
	gchar** _tmp91_;
	gchar** _tmp92_;
	gint _tmp92__length1;
	AdwComboRow* _tmp93_;
	gchar* _tmp94_;
	gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* _tmp97_;
	gchar* _tmp98_;
	gchar** _tmp99_;
	gchar** _tmp100_;
	gint _tmp100__length1;
	AdwComboRow* _tmp101_;
	AdwEntryRow* _tmp102_;
	GtkWidget* _tmp103_;
	AdwEntryRow* _tmp104_;
	GtkWidget* _tmp105_;
	AdwSwitchRow* _tmp106_;
	GtkWidget* _tmp107_;
	AdwComboRow* _tmp108_;
	GtkWidget* _tmp109_;
	AdwComboRow* _tmp110_;
	GtkWidget* _tmp111_;
	GtkWidget** _tmp112_;
	GtkWidget** _tmp113_;
	gint _tmp113__length1;
	GtkFlowBox* _tmp114_;
	GtkFlowBox* _tmp115_;
	gchar* _tmp116_;
	gchar* _tmp117_;
	gchar* _tmp118_;
	gchar* _tmp119_;
	gchar** _tmp120_;
	gchar** _tmp121_;
	gint _tmp121__length1;
	AdwComboRow* _tmp122_;
	GtkScale* _tmp123_ = NULL;
	GtkListBoxRow* _tmp124_;
	GtkScale* _tmp125_ = NULL;
	GtkListBoxRow* _tmp126_;
	AdwComboRow* _tmp127_;
	GtkWidget* _tmp128_;
	GtkListBoxRow* _tmp129_;
	GtkWidget* _tmp130_;
	GtkListBoxRow* _tmp131_;
	GtkWidget* _tmp132_;
	GtkWidget** _tmp133_;
	GtkWidget** _tmp134_;
	gint _tmp134__length1;
	GtkFlowBox* _tmp135_;
	GtkFlowBox* _tmp136_;
	g_return_val_if_fail (config != NULL, NULL);
	self = (ProtonPlusWidgetsMangoHudPerformancePage*) proton_plus_widgets_mango_hud_page_construct (object_type, config);
	_tmp0_ = proton_plus_utils_mango_hud_manager_get_fps (config);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Show FPS"), _tmp1_, ___lambda252__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->fps_row);
	self->priv->fps_row = _tmp2_;
	_tmp3_ = proton_plus_utils_mango_hud_manager_get_fps_avg (config);
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("FPS Average"), _tmp4_, ___lambda253__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->fps_avg_row);
	self->priv->fps_avg_row = _tmp5_;
	_tmp6_ = proton_plus_utils_mango_hud_manager_get_fps_limit_stats (config);
	_tmp7_ = _tmp6_;
	_tmp8_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("FPS Limit"), _tmp7_, ___lambda254__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->fps_limit_stats_row);
	self->priv->fps_limit_stats_row = _tmp8_;
	_tmp9_ = proton_plus_utils_mango_hud_manager_get_frametime (config);
	_tmp10_ = _tmp9_;
	_tmp11_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Frame Time"), _tmp10_, ___lambda255__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->frametime_row);
	self->priv->frametime_row = _tmp11_;
	_tmp12_ = proton_plus_utils_mango_hud_manager_get_frame_count (config);
	_tmp13_ = _tmp12_;
	_tmp14_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Count Frames"), _tmp13_, ___lambda256__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->frame_count_row);
	self->priv->frame_count_row = _tmp14_;
	_tmp15_ = proton_plus_utils_mango_hud_manager_get_vps (config);
	_tmp16_ = _tmp15_;
	_tmp17_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("VPS"), _tmp16_, ___lambda257__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->vps_row);
	self->priv->vps_row = _tmp17_;
	_tmp18_ = proton_plus_utils_mango_hud_manager_get_ftrace (config);
	_tmp19_ = _tmp18_;
	_tmp20_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("ftrace debug"), _tmp19_, ___lambda258__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->ftrace_row);
	self->priv->ftrace_row = _tmp20_;
	_tmp21_ = self->priv->fps_row;
	_tmp22_ = _g_object_ref0 ((GtkWidget*) _tmp21_);
	_tmp23_ = self->priv->fps_avg_row;
	_tmp24_ = _g_object_ref0 ((GtkWidget*) _tmp23_);
	_tmp25_ = self->priv->fps_limit_stats_row;
	_tmp26_ = _g_object_ref0 ((GtkWidget*) _tmp25_);
	_tmp27_ = self->priv->frametime_row;
	_tmp28_ = _g_object_ref0 ((GtkWidget*) _tmp27_);
	_tmp29_ = self->priv->frame_count_row;
	_tmp30_ = _g_object_ref0 ((GtkWidget*) _tmp29_);
	_tmp31_ = self->priv->vps_row;
	_tmp32_ = _g_object_ref0 ((GtkWidget*) _tmp31_);
	_tmp33_ = self->priv->ftrace_row;
	_tmp34_ = _g_object_ref0 ((GtkWidget*) _tmp33_);
	_tmp35_ = g_new0 (GtkWidget*, 7 + 1);
	_tmp35_[0] = _tmp22_;
	_tmp35_[1] = _tmp24_;
	_tmp35_[2] = _tmp26_;
	_tmp35_[3] = _tmp28_;
	_tmp35_[4] = _tmp30_;
	_tmp35_[5] = _tmp32_;
	_tmp35_[6] = _tmp34_;
	_tmp36_ = _tmp35_;
	_tmp36__length1 = 7;
	_tmp37_ = proton_plus_widgets_mango_hud_page_add_flow_group ((ProtonPlusWidgetsMangoHudPage*) self, (GtkBox*) self, _ ("Information"), _tmp36_, (gint) 7, "heading");
	_tmp38_ = _tmp37_;
	_g_object_unref0 (_tmp38_);
	_tmp36_ = (_vala_array_free (_tmp36_, _tmp36__length1, (GDestroyNotify) g_object_unref), NULL);
	_tmp39_ = g_strdup (_ ("Unset"));
	_tmp40_ = g_strdup (_ ("Adaptive"));
	_tmp41_ = g_strdup (_ ("Mailbox"));
	_tmp42_ = g_strdup (_ ("OFF"));
	_tmp43_ = g_strdup (_ ("ON"));
	_tmp44_ = g_new0 (gchar*, 5 + 1);
	_tmp44_[0] = _tmp39_;
	_tmp44_[1] = _tmp40_;
	_tmp44_[2] = _tmp41_;
	_tmp44_[3] = _tmp42_;
	_tmp44_[4] = _tmp43_;
	_tmp45_ = _tmp44_;
	_tmp45__length1 = 5;
	_tmp46_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Vulkan"), _tmp45_, (gint) 5, 0, NULL, ___lambda259__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->vsync_row);
	self->priv->vsync_row = _tmp46_;
	_tmp45_ = (_vala_array_free (_tmp45_, _tmp45__length1, (GDestroyNotify) g_free), NULL);
	_tmp47_ = g_strdup (_ ("Unset"));
	_tmp48_ = g_strdup (_ ("Adaptive"));
	_tmp49_ = g_strdup (_ ("OFF"));
	_tmp50_ = g_strdup (_ ("ON"));
	_tmp51_ = g_new0 (gchar*, 4 + 1);
	_tmp51_[0] = _tmp47_;
	_tmp51_[1] = _tmp48_;
	_tmp51_[2] = _tmp49_;
	_tmp51_[3] = _tmp50_;
	_tmp52_ = _tmp51_;
	_tmp52__length1 = 4;
	_tmp53_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("OpenGL"), _tmp52_, (gint) 4, 0, NULL, ___lambda260__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->gl_vsync_row);
	self->priv->gl_vsync_row = _tmp53_;
	_tmp52_ = (_vala_array_free (_tmp52_, _tmp52__length1, (GDestroyNotify) g_free), NULL);
	_tmp54_ = self->priv->vsync_row;
	_tmp55_ = _g_object_ref0 ((GtkWidget*) _tmp54_);
	_tmp56_ = self->priv->gl_vsync_row;
	_tmp57_ = _g_object_ref0 ((GtkWidget*) _tmp56_);
	_tmp58_ = g_new0 (GtkWidget*, 2 + 1);
	_tmp58_[0] = _tmp55_;
	_tmp58_[1] = _tmp57_;
	_tmp59_ = _tmp58_;
	_tmp59__length1 = 2;
	_tmp60_ = proton_plus_widgets_mango_hud_page_add_flow_group ((ProtonPlusWidgetsMangoHudPage*) self, (GtkBox*) self, _ ("VSYNC"), _tmp59_, (gint) 2, "heading");
	_tmp61_ = _tmp60_;
	_g_object_unref0 (_tmp61_);
	_tmp59_ = (_vala_array_free (_tmp59_, _tmp59__length1, (GDestroyNotify) g_object_unref), NULL);
	_tmp62_ = proton_plus_utils_mango_hud_manager_get_fps_limit (config);
	_tmp63_ = _tmp62_;
	_tmp64_ = proton_plus_widgets_mango_hud_page_create_entry ((ProtonPlusWidgetsMangoHudPage*) self, _ ("FPS Limit"), _tmp63_, ___lambda261__proton_plus_widgets_mango_hud_page_set_value_func_str, self, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_NUMERIC);
	_g_object_unref0 (self->priv->fps_limit_row);
	self->priv->fps_limit_row = _tmp64_;
	_tmp65_ = proton_plus_utils_mango_hud_manager_get_fps_limit_offset (config);
	_tmp66_ = _tmp65_;
	_tmp67_ = g_strdup_printf ("%i", _tmp66_);
	_tmp68_ = _tmp67_;
	_tmp69_ = proton_plus_widgets_mango_hud_page_create_entry ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Offset"), _tmp68_, ___lambda262__proton_plus_widgets_mango_hud_page_set_value_func_str, self, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_NUMERIC);
	_g_object_unref0 (self->priv->fps_limit_offset_row);
	self->priv->fps_limit_offset_row = _tmp69_;
	_g_free0 (_tmp68_);
	_tmp70_ = gtk_color_dialog_new ();
	color_dialog = _tmp70_;
	_tmp71_ = proton_plus_utils_mango_hud_manager_get_change_fps_limit_colors (config);
	_tmp72_ = _tmp71_;
	_tmp73_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Change FPS Colors"), _tmp72_, ___lambda263__proton_plus_widgets_mango_hud_page_set_value_func, self, NULL);
	_g_object_unref0 (self->priv->change_fps_limit_colors_row);
	self->priv->change_fps_limit_colors_row = _tmp73_;
	_tmp74_ = _g_object_ref0 (color_dialog);
	_tmp75_ = (GtkColorDialogButton*) gtk_color_dialog_button_new (_tmp74_);
	gtk_widget_set_valign ((GtkWidget*) _tmp75_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp75_);
	_g_object_unref0 (self->priv->fps_limit_color_1_btn);
	self->priv->fps_limit_color_1_btn = _tmp75_;
	_tmp76_ = _g_object_ref0 (color_dialog);
	_tmp77_ = (GtkColorDialogButton*) gtk_color_dialog_button_new (_tmp76_);
	gtk_widget_set_valign ((GtkWidget*) _tmp77_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp77_);
	_g_object_unref0 (self->priv->fps_limit_color_2_btn);
	self->priv->fps_limit_color_2_btn = _tmp77_;
	_tmp78_ = _g_object_ref0 (color_dialog);
	_tmp79_ = (GtkColorDialogButton*) gtk_color_dialog_button_new (_tmp78_);
	gtk_widget_set_valign ((GtkWidget*) _tmp79_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp79_);
	_g_object_unref0 (self->priv->fps_limit_color_3_btn);
	self->priv->fps_limit_color_3_btn = _tmp79_;
	_tmp80_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
	g_object_ref_sink (_tmp80_);
	fps_limit_color_box = _tmp80_;
	_tmp81_ = self->priv->fps_limit_color_1_btn;
	gtk_box_append (fps_limit_color_box, (GtkWidget*) _tmp81_);
	_tmp82_ = self->priv->fps_limit_color_2_btn;
	gtk_box_append (fps_limit_color_box, (GtkWidget*) _tmp82_);
	_tmp83_ = self->priv->fps_limit_color_3_btn;
	gtk_box_append (fps_limit_color_box, (GtkWidget*) _tmp83_);
	_tmp84_ = self->priv->change_fps_limit_colors_row;
	adw_action_row_add_suffix ((AdwActionRow*) _tmp84_, (GtkWidget*) fps_limit_color_box);
	_tmp85_ = self->priv->change_fps_limit_colors_row;
	g_object_bind_property_with_closures ((GObject*) _tmp85_, "active", (GObject*) fps_limit_color_box, "visible", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	proton_plus_widgets_mango_hud_performance_page_refresh_fps_limit_color_btns (self);
	_tmp86_ = self->priv->fps_limit_color_1_btn;
	g_signal_connect_object ((GObject*) _tmp86_, "notify::rgba", (GCallback) _proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors_g_object_notify, self, 0);
	_tmp87_ = self->priv->fps_limit_color_2_btn;
	g_signal_connect_object ((GObject*) _tmp87_, "notify::rgba", (GCallback) _proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors_g_object_notify, self, 0);
	_tmp88_ = self->priv->fps_limit_color_3_btn;
	g_signal_connect_object ((GObject*) _tmp88_, "notify::rgba", (GCallback) _proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors_g_object_notify, self, 0);
	_tmp89_ = g_strdup ("late");
	_tmp90_ = g_strdup ("early");
	_tmp91_ = g_new0 (gchar*, 2 + 1);
	_tmp91_[0] = _tmp89_;
	_tmp91_[1] = _tmp90_;
	_tmp92_ = _tmp91_;
	_tmp92__length1 = 2;
	_tmp93_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Method"), _tmp92_, (gint) 2, 0, NULL, ___lambda264__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->fps_limit_method_row);
	self->priv->fps_limit_method_row = _tmp93_;
	_tmp92_ = (_vala_array_free (_tmp92_, _tmp92__length1, (GDestroyNotify) g_free), NULL);
	_tmp94_ = g_strdup (_ ("None"));
	_tmp95_ = g_strdup ("Shift_L+F1");
	_tmp96_ = g_strdup ("Shift_L+F2");
	_tmp97_ = g_strdup ("Shift_L+F3");
	_tmp98_ = g_strdup ("Shift_L+F4");
	_tmp99_ = g_new0 (gchar*, 5 + 1);
	_tmp99_[0] = _tmp94_;
	_tmp99_[1] = _tmp95_;
	_tmp99_[2] = _tmp96_;
	_tmp99_[3] = _tmp97_;
	_tmp99_[4] = _tmp98_;
	_tmp100_ = _tmp99_;
	_tmp100__length1 = 5;
	_tmp101_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Limit Toggle Key"), _tmp100_, (gint) 5, 0, NULL, ___lambda265__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->toggle_fps_limit_row);
	self->priv->toggle_fps_limit_row = _tmp101_;
	_tmp100_ = (_vala_array_free (_tmp100_, _tmp100__length1, (GDestroyNotify) g_free), NULL);
	_tmp102_ = self->priv->fps_limit_row;
	_tmp103_ = _g_object_ref0 ((GtkWidget*) _tmp102_);
	_tmp104_ = self->priv->fps_limit_offset_row;
	_tmp105_ = _g_object_ref0 ((GtkWidget*) _tmp104_);
	_tmp106_ = self->priv->change_fps_limit_colors_row;
	_tmp107_ = _g_object_ref0 ((GtkWidget*) _tmp106_);
	_tmp108_ = self->priv->fps_limit_method_row;
	_tmp109_ = _g_object_ref0 ((GtkWidget*) _tmp108_);
	_tmp110_ = self->priv->toggle_fps_limit_row;
	_tmp111_ = _g_object_ref0 ((GtkWidget*) _tmp110_);
	_tmp112_ = g_new0 (GtkWidget*, 5 + 1);
	_tmp112_[0] = _tmp103_;
	_tmp112_[1] = _tmp105_;
	_tmp112_[2] = _tmp107_;
	_tmp112_[3] = _tmp109_;
	_tmp112_[4] = _tmp111_;
	_tmp113_ = _tmp112_;
	_tmp113__length1 = 5;
	_tmp114_ = proton_plus_widgets_mango_hud_page_add_flow_group ((ProtonPlusWidgetsMangoHudPage*) self, (GtkBox*) self, _ ("Limiters"), _tmp113_, (gint) 5, "heading");
	_tmp115_ = _tmp114_;
	_g_object_unref0 (_tmp115_);
	_tmp113_ = (_vala_array_free (_tmp113_, _tmp113__length1, (GDestroyNotify) g_object_unref), NULL);
	_tmp116_ = g_strdup (_ ("None"));
	_tmp117_ = g_strdup (_ ("Bicubic"));
	_tmp118_ = g_strdup (_ ("Trilinear"));
	_tmp119_ = g_strdup (_ ("Retro"));
	_tmp120_ = g_new0 (gchar*, 4 + 1);
	_tmp120_[0] = _tmp116_;
	_tmp120_[1] = _tmp117_;
	_tmp120_[2] = _tmp118_;
	_tmp120_[3] = _tmp119_;
	_tmp121_ = _tmp120_;
	_tmp121__length1 = 4;
	_tmp122_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Filtering"), _tmp121_, (gint) 4, 0, NULL, ___lambda266__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->picmip_row);
	self->priv->picmip_row = _tmp122_;
	_tmp121_ = (_vala_array_free (_tmp121_, _tmp121__length1, (GDestroyNotify) g_free), NULL);
	_tmp124_ = proton_plus_widgets_mango_hud_page_create_scale ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Anisotropic Filtering"), (gdouble) 0, (gdouble) 16, (gdouble) 1, &_tmp123_, ___lambda267__proton_plus_widgets_mango_hud_page_set_value_func_str, self);
	_g_object_unref0 (self->priv->af_scale);
	self->priv->af_scale = _tmp123_;
	_g_object_unref0 (self->priv->af_row);
	self->priv->af_row = _tmp124_;
	_tmp126_ = proton_plus_widgets_mango_hud_page_create_scale ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Mip-map LoD Bias"), (gdouble) -16, (gdouble) 16, (gdouble) 1, &_tmp125_, ___lambda268__proton_plus_widgets_mango_hud_page_set_value_func_str, self);
	_g_object_unref0 (self->priv->lod_bias_scale);
	self->priv->lod_bias_scale = _tmp125_;
	_g_object_unref0 (self->priv->lod_bias_row);
	self->priv->lod_bias_row = _tmp126_;
	_tmp127_ = self->priv->picmip_row;
	_tmp128_ = _g_object_ref0 ((GtkWidget*) _tmp127_);
	_tmp129_ = self->priv->af_row;
	_tmp130_ = _g_object_ref0 ((GtkWidget*) _tmp129_);
	_tmp131_ = self->priv->lod_bias_row;
	_tmp132_ = _g_object_ref0 ((GtkWidget*) _tmp131_);
	_tmp133_ = g_new0 (GtkWidget*, 3 + 1);
	_tmp133_[0] = _tmp128_;
	_tmp133_[1] = _tmp130_;
	_tmp133_[2] = _tmp132_;
	_tmp134_ = _tmp133_;
	_tmp134__length1 = 3;
	_tmp135_ = proton_plus_widgets_mango_hud_page_add_flow_group ((ProtonPlusWidgetsMangoHudPage*) self, (GtkBox*) self, _ ("Filters"), _tmp134_, (gint) 3, "heading");
	_tmp136_ = _tmp135_;
	_g_object_unref0 (_tmp136_);
	_tmp134_ = (_vala_array_free (_tmp134_, _tmp134__length1, (GDestroyNotify) g_object_unref), NULL);
	proton_plus_widgets_mango_hud_page_refresh ((ProtonPlusWidgetsMangoHudPage*) self);
	_g_object_unref0 (fps_limit_color_box);
	_g_object_unref0 (color_dialog);
	return self;
}

ProtonPlusWidgetsMangoHudPerformancePage*
proton_plus_widgets_mango_hud_performance_page_new (ProtonPlusUtilsMangoHudManager* config)
{
	return proton_plus_widgets_mango_hud_performance_page_construct (PROTON_PLUS_WIDGETS_MANGO_HUD_TYPE_PERFORMANCE_PAGE, config);
}

static gdouble
double_parse (const gchar* str)
{
	gdouble result;
	g_return_val_if_fail (str != NULL, -1.0);
	result = g_ascii_strtod (str, NULL);
	return result;
}

static void
proton_plus_widgets_mango_hud_performance_page_real_refresh (ProtonPlusWidgetsMangoHudPage* base)
{
	ProtonPlusWidgetsMangoHudPerformancePage * self;
	AdwSwitchRow* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	ProtonPlusUtilsMangoHudManager* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	AdwSwitchRow* _tmp5_;
	ProtonPlusUtilsMangoHudManager* _tmp6_;
	ProtonPlusUtilsMangoHudManager* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	AdwSwitchRow* _tmp10_;
	ProtonPlusUtilsMangoHudManager* _tmp11_;
	ProtonPlusUtilsMangoHudManager* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	AdwSwitchRow* _tmp15_;
	ProtonPlusUtilsMangoHudManager* _tmp16_;
	ProtonPlusUtilsMangoHudManager* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	AdwSwitchRow* _tmp20_;
	ProtonPlusUtilsMangoHudManager* _tmp21_;
	ProtonPlusUtilsMangoHudManager* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	AdwSwitchRow* _tmp25_;
	ProtonPlusUtilsMangoHudManager* _tmp26_;
	ProtonPlusUtilsMangoHudManager* _tmp27_;
	gboolean _tmp28_;
	gboolean _tmp29_;
	AdwSwitchRow* _tmp30_;
	ProtonPlusUtilsMangoHudManager* _tmp31_;
	ProtonPlusUtilsMangoHudManager* _tmp32_;
	gboolean _tmp33_;
	gboolean _tmp34_;
	gint vsync_index = 0;
	ProtonPlusUtilsMangoHudManager* _tmp35_;
	ProtonPlusUtilsMangoHudManager* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	GQuark _tmp41_ = 0U;
	static GQuark _tmp40_label0 = 0;
	static GQuark _tmp40_label1 = 0;
	static GQuark _tmp40_label2 = 0;
	static GQuark _tmp40_label3 = 0;
	static GQuark _tmp40_label4 = 0;
	AdwComboRow* _tmp42_;
	gint gl_vsync_index = 0;
	ProtonPlusUtilsMangoHudManager* _tmp43_;
	ProtonPlusUtilsMangoHudManager* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	GQuark _tmp49_ = 0U;
	static GQuark _tmp48_label0 = 0;
	static GQuark _tmp48_label1 = 0;
	static GQuark _tmp48_label2 = 0;
	static GQuark _tmp48_label3 = 0;
	AdwComboRow* _tmp50_;
	AdwEntryRow* _tmp51_;
	ProtonPlusUtilsMangoHudManager* _tmp52_;
	ProtonPlusUtilsMangoHudManager* _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
	AdwEntryRow* _tmp56_;
	ProtonPlusUtilsMangoHudManager* _tmp57_;
	ProtonPlusUtilsMangoHudManager* _tmp58_;
	gint _tmp59_;
	gint _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	AdwSwitchRow* _tmp63_;
	ProtonPlusUtilsMangoHudManager* _tmp64_;
	ProtonPlusUtilsMangoHudManager* _tmp65_;
	gboolean _tmp66_;
	gboolean _tmp67_;
	gint fps_limit_method_index = 0;
	ProtonPlusUtilsMangoHudManager* _tmp68_;
	ProtonPlusUtilsMangoHudManager* _tmp69_;
	const gchar* _tmp70_;
	const gchar* _tmp71_;
	const gchar* _tmp72_;
	GQuark _tmp74_ = 0U;
	static GQuark _tmp73_label0 = 0;
	static GQuark _tmp73_label1 = 0;
	AdwComboRow* _tmp75_;
	gint toggle_fps_limit_index = 0;
	ProtonPlusUtilsMangoHudManager* _tmp76_;
	ProtonPlusUtilsMangoHudManager* _tmp77_;
	const gchar* _tmp78_;
	const gchar* _tmp79_;
	const gchar* _tmp80_;
	GQuark _tmp82_ = 0U;
	static GQuark _tmp81_label0 = 0;
	static GQuark _tmp81_label1 = 0;
	static GQuark _tmp81_label2 = 0;
	static GQuark _tmp81_label3 = 0;
	static GQuark _tmp81_label4 = 0;
	AdwComboRow* _tmp83_;
	ProtonPlusUtilsMangoHudManager* _tmp84_;
	ProtonPlusUtilsMangoHudManager* _tmp85_;
	const gchar* _tmp86_;
	const gchar* _tmp87_;
	gdouble _tmp95_ = 0.0;
	ProtonPlusUtilsMangoHudManager* _tmp96_;
	ProtonPlusUtilsMangoHudManager* _tmp97_;
	const gchar* _tmp98_;
	const gchar* _tmp99_;
	GtkScale* _tmp104_;
	gdouble _tmp105_ = 0.0;
	ProtonPlusUtilsMangoHudManager* _tmp106_;
	ProtonPlusUtilsMangoHudManager* _tmp107_;
	const gchar* _tmp108_;
	const gchar* _tmp109_;
	GtkScale* _tmp114_;
	self = (ProtonPlusWidgetsMangoHudPerformancePage*) base;
	proton_plus_widgets_mango_hud_page_set_is_updating ((ProtonPlusWidgetsMangoHudPage*) self, TRUE);
	_tmp0_ = self->priv->fps_row;
	_tmp1_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = proton_plus_utils_mango_hud_manager_get_fps (_tmp2_);
	_tmp4_ = _tmp3_;
	adw_switch_row_set_active (_tmp0_, _tmp4_);
	_tmp5_ = self->priv->fps_avg_row;
	_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp7_ = _tmp6_;
	_tmp8_ = proton_plus_utils_mango_hud_manager_get_fps_avg (_tmp7_);
	_tmp9_ = _tmp8_;
	adw_switch_row_set_active (_tmp5_, _tmp9_);
	_tmp10_ = self->priv->fps_limit_stats_row;
	_tmp11_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp12_ = _tmp11_;
	_tmp13_ = proton_plus_utils_mango_hud_manager_get_fps_limit_stats (_tmp12_);
	_tmp14_ = _tmp13_;
	adw_switch_row_set_active (_tmp10_, _tmp14_);
	_tmp15_ = self->priv->frametime_row;
	_tmp16_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp17_ = _tmp16_;
	_tmp18_ = proton_plus_utils_mango_hud_manager_get_frametime (_tmp17_);
	_tmp19_ = _tmp18_;
	adw_switch_row_set_active (_tmp15_, _tmp19_);
	_tmp20_ = self->priv->frame_count_row;
	_tmp21_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp22_ = _tmp21_;
	_tmp23_ = proton_plus_utils_mango_hud_manager_get_frame_count (_tmp22_);
	_tmp24_ = _tmp23_;
	adw_switch_row_set_active (_tmp20_, _tmp24_);
	_tmp25_ = self->priv->vps_row;
	_tmp26_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp27_ = _tmp26_;
	_tmp28_ = proton_plus_utils_mango_hud_manager_get_vps (_tmp27_);
	_tmp29_ = _tmp28_;
	adw_switch_row_set_active (_tmp25_, _tmp29_);
	_tmp30_ = self->priv->ftrace_row;
	_tmp31_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp32_ = _tmp31_;
	_tmp33_ = proton_plus_utils_mango_hud_manager_get_ftrace (_tmp32_);
	_tmp34_ = _tmp33_;
	adw_switch_row_set_active (_tmp30_, _tmp34_);
	vsync_index = 0;
	_tmp35_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp36_ = _tmp35_;
	_tmp37_ = proton_plus_utils_mango_hud_manager_get_vsync (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = _tmp38_;
	_tmp41_ = (NULL == _tmp39_) ? 0 : g_quark_from_string (_tmp39_);
	if (_tmp41_ == ((0 != _tmp40_label0) ? _tmp40_label0 : (_tmp40_label0 = g_quark_from_static_string ("")))) {
		switch (0) {
			default:
			{
				vsync_index = 0;
				break;
			}
		}
	} else if (_tmp41_ == ((0 != _tmp40_label1) ? _tmp40_label1 : (_tmp40_label1 = g_quark_from_static_string ("0")))) {
		switch (0) {
			default:
			{
				vsync_index = 1;
				break;
			}
		}
	} else if (_tmp41_ == ((0 != _tmp40_label2) ? _tmp40_label2 : (_tmp40_label2 = g_quark_from_static_string ("1")))) {
		switch (0) {
			default:
			{
				vsync_index = 2;
				break;
			}
		}
	} else if (_tmp41_ == ((0 != _tmp40_label3) ? _tmp40_label3 : (_tmp40_label3 = g_quark_from_static_string ("2")))) {
		switch (0) {
			default:
			{
				vsync_index = 3;
				break;
			}
		}
	} else if (_tmp41_ == ((0 != _tmp40_label4) ? _tmp40_label4 : (_tmp40_label4 = g_quark_from_static_string ("3")))) {
		switch (0) {
			default:
			{
				vsync_index = 4;
				break;
			}
		}
	}
	_tmp42_ = self->priv->vsync_row;
	adw_combo_row_set_selected (_tmp42_, (guint) vsync_index);
	gl_vsync_index = 0;
	_tmp43_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp44_ = _tmp43_;
	_tmp45_ = proton_plus_utils_mango_hud_manager_get_gl_vsync (_tmp44_);
	_tmp46_ = _tmp45_;
	_tmp47_ = _tmp46_;
	_tmp49_ = (NULL == _tmp47_) ? 0 : g_quark_from_string (_tmp47_);
	if (_tmp49_ == ((0 != _tmp48_label0) ? _tmp48_label0 : (_tmp48_label0 = g_quark_from_static_string ("")))) {
		switch (0) {
			default:
			{
				gl_vsync_index = 0;
				break;
			}
		}
	} else if (_tmp49_ == ((0 != _tmp48_label1) ? _tmp48_label1 : (_tmp48_label1 = g_quark_from_static_string ("-1")))) {
		switch (0) {
			default:
			{
				gl_vsync_index = 1;
				break;
			}
		}
	} else if (_tmp49_ == ((0 != _tmp48_label2) ? _tmp48_label2 : (_tmp48_label2 = g_quark_from_static_string ("0")))) {
		switch (0) {
			default:
			{
				gl_vsync_index = 2;
				break;
			}
		}
	} else if (_tmp49_ == ((0 != _tmp48_label3) ? _tmp48_label3 : (_tmp48_label3 = g_quark_from_static_string ("1")))) {
		switch (0) {
			default:
			{
				gl_vsync_index = 3;
				break;
			}
		}
	}
	_tmp50_ = self->priv->gl_vsync_row;
	adw_combo_row_set_selected (_tmp50_, (guint) gl_vsync_index);
	_tmp51_ = self->priv->fps_limit_row;
	_tmp52_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp53_ = _tmp52_;
	_tmp54_ = proton_plus_utils_mango_hud_manager_get_fps_limit (_tmp53_);
	_tmp55_ = _tmp54_;
	gtk_editable_set_text ((GtkEditable*) _tmp51_, _tmp55_);
	_tmp56_ = self->priv->fps_limit_offset_row;
	_tmp57_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp58_ = _tmp57_;
	_tmp59_ = proton_plus_utils_mango_hud_manager_get_fps_limit_offset (_tmp58_);
	_tmp60_ = _tmp59_;
	_tmp61_ = g_strdup_printf ("%i", _tmp60_);
	_tmp62_ = _tmp61_;
	gtk_editable_set_text ((GtkEditable*) _tmp56_, _tmp62_);
	_g_free0 (_tmp62_);
	_tmp63_ = self->priv->change_fps_limit_colors_row;
	_tmp64_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp65_ = _tmp64_;
	_tmp66_ = proton_plus_utils_mango_hud_manager_get_change_fps_limit_colors (_tmp65_);
	_tmp67_ = _tmp66_;
	adw_switch_row_set_active (_tmp63_, _tmp67_);
	proton_plus_widgets_mango_hud_performance_page_refresh_fps_limit_color_btns (self);
	fps_limit_method_index = 0;
	_tmp68_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp69_ = _tmp68_;
	_tmp70_ = proton_plus_utils_mango_hud_manager_get_fps_limit_method (_tmp69_);
	_tmp71_ = _tmp70_;
	_tmp72_ = _tmp71_;
	_tmp74_ = (NULL == _tmp72_) ? 0 : g_quark_from_string (_tmp72_);
	if (_tmp74_ == ((0 != _tmp73_label0) ? _tmp73_label0 : (_tmp73_label0 = g_quark_from_static_string ("late")))) {
		switch (0) {
			default:
			{
				fps_limit_method_index = 0;
				break;
			}
		}
	} else if (_tmp74_ == ((0 != _tmp73_label1) ? _tmp73_label1 : (_tmp73_label1 = g_quark_from_static_string ("early")))) {
		switch (0) {
			default:
			{
				fps_limit_method_index = 1;
				break;
			}
		}
	}
	_tmp75_ = self->priv->fps_limit_method_row;
	adw_combo_row_set_selected (_tmp75_, (guint) fps_limit_method_index);
	toggle_fps_limit_index = 0;
	_tmp76_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp77_ = _tmp76_;
	_tmp78_ = proton_plus_utils_mango_hud_manager_get_toggle_fps_limit (_tmp77_);
	_tmp79_ = _tmp78_;
	_tmp80_ = _tmp79_;
	_tmp82_ = (NULL == _tmp80_) ? 0 : g_quark_from_string (_tmp80_);
	if (_tmp82_ == ((0 != _tmp81_label0) ? _tmp81_label0 : (_tmp81_label0 = g_quark_from_static_string ("")))) {
		switch (0) {
			default:
			{
				toggle_fps_limit_index = 0;
				break;
			}
		}
	} else if (_tmp82_ == ((0 != _tmp81_label1) ? _tmp81_label1 : (_tmp81_label1 = g_quark_from_static_string ("Shift_L+F1")))) {
		switch (0) {
			default:
			{
				toggle_fps_limit_index = 1;
				break;
			}
		}
	} else if (_tmp82_ == ((0 != _tmp81_label2) ? _tmp81_label2 : (_tmp81_label2 = g_quark_from_static_string ("Shift_L+F2")))) {
		switch (0) {
			default:
			{
				toggle_fps_limit_index = 2;
				break;
			}
		}
	} else if (_tmp82_ == ((0 != _tmp81_label3) ? _tmp81_label3 : (_tmp81_label3 = g_quark_from_static_string ("Shift_L+F3")))) {
		switch (0) {
			default:
			{
				toggle_fps_limit_index = 3;
				break;
			}
		}
	} else if (_tmp82_ == ((0 != _tmp81_label4) ? _tmp81_label4 : (_tmp81_label4 = g_quark_from_static_string ("Shift_L+F4")))) {
		switch (0) {
			default:
			{
				toggle_fps_limit_index = 4;
				break;
			}
		}
	}
	_tmp83_ = self->priv->toggle_fps_limit_row;
	adw_combo_row_set_selected (_tmp83_, (guint) toggle_fps_limit_index);
	_tmp84_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp85_ = _tmp84_;
	_tmp86_ = proton_plus_utils_mango_hud_manager_get_picmip (_tmp85_);
	_tmp87_ = _tmp86_;
	if (g_strcmp0 (_tmp87_, "") == 0) {
		AdwComboRow* _tmp88_;
		_tmp88_ = self->priv->picmip_row;
		adw_combo_row_set_selected (_tmp88_, (guint) 0);
	} else {
		ProtonPlusUtilsMangoHudManager* _tmp89_;
		ProtonPlusUtilsMangoHudManager* _tmp90_;
		const gchar* _tmp91_;
		const gchar* _tmp92_;
		_tmp89_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
		_tmp90_ = _tmp89_;
		_tmp91_ = proton_plus_utils_mango_hud_manager_get_picmip (_tmp90_);
		_tmp92_ = _tmp91_;
		if (g_strcmp0 (_tmp92_, "-1") == 0) {
			AdwComboRow* _tmp93_;
			_tmp93_ = self->priv->picmip_row;
			adw_combo_row_set_selected (_tmp93_, (guint) 3);
		} else {
			AdwComboRow* _tmp94_;
			_tmp94_ = self->priv->picmip_row;
			adw_combo_row_set_selected (_tmp94_, (guint) 1);
		}
	}
	_tmp96_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp97_ = _tmp96_;
	_tmp98_ = proton_plus_utils_mango_hud_manager_get_af (_tmp97_);
	_tmp99_ = _tmp98_;
	if (g_strcmp0 (_tmp99_, "") != 0) {
		ProtonPlusUtilsMangoHudManager* _tmp100_;
		ProtonPlusUtilsMangoHudManager* _tmp101_;
		const gchar* _tmp102_;
		const gchar* _tmp103_;
		_tmp100_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
		_tmp101_ = _tmp100_;
		_tmp102_ = proton_plus_utils_mango_hud_manager_get_af (_tmp101_);
		_tmp103_ = _tmp102_;
		_tmp95_ = double_parse (_tmp103_);
	} else {
		_tmp95_ = (gdouble) 0;
	}
	_tmp104_ = self->priv->af_scale;
	gtk_range_set_value ((GtkRange*) _tmp104_, _tmp95_);
	_tmp106_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp107_ = _tmp106_;
	_tmp108_ = proton_plus_utils_mango_hud_manager_get_lod_bias (_tmp107_);
	_tmp109_ = _tmp108_;
	if (g_strcmp0 (_tmp109_, "") != 0) {
		ProtonPlusUtilsMangoHudManager* _tmp110_;
		ProtonPlusUtilsMangoHudManager* _tmp111_;
		const gchar* _tmp112_;
		const gchar* _tmp113_;
		_tmp110_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
		_tmp111_ = _tmp110_;
		_tmp112_ = proton_plus_utils_mango_hud_manager_get_lod_bias (_tmp111_);
		_tmp113_ = _tmp112_;
		_tmp105_ = double_parse (_tmp113_);
	} else {
		_tmp105_ = (gdouble) 0;
	}
	_tmp114_ = self->priv->lod_bias_scale;
	gtk_range_set_value ((GtkRange*) _tmp114_, _tmp105_);
	proton_plus_widgets_mango_hud_page_set_is_updating ((ProtonPlusWidgetsMangoHudPage*) self, FALSE);
}

static void
proton_plus_widgets_mango_hud_performance_page_update_fps_limit_colors (ProtonPlusWidgetsMangoHudPerformancePage* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GdkRGBA c1 = {0};
	GdkRGBA c2 = {0};
	GdkRGBA c3 = {0};
	GtkColorDialogButton* _tmp2_;
	GdkRGBA _tmp3_ = {0};
	GtkColorDialogButton* _tmp4_;
	GdkRGBA _tmp5_ = {0};
	GtkColorDialogButton* _tmp6_;
	GdkRGBA _tmp7_ = {0};
	ProtonPlusUtilsMangoHudManager* _tmp8_;
	ProtonPlusUtilsMangoHudManager* _tmp9_;
	GdkRGBA _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GdkRGBA _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GdkRGBA _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_is_updating ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = self->priv->fps_limit_color_1_btn;
	g_object_get ((GObject*) _tmp2_, "rgba", &_tmp3_, NULL);
	c1 = _tmp3_;
	_tmp4_ = self->priv->fps_limit_color_2_btn;
	g_object_get ((GObject*) _tmp4_, "rgba", &_tmp5_, NULL);
	c2 = _tmp5_;
	_tmp6_ = self->priv->fps_limit_color_3_btn;
	g_object_get ((GObject*) _tmp6_, "rgba", &_tmp7_, NULL);
	c3 = _tmp7_;
	_tmp8_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp9_ = _tmp8_;
	_tmp10_ = c1;
	_tmp11_ = proton_plus_widgets_mango_hud_page_rgba_to_hex ((ProtonPlusWidgetsMangoHudPage*) self, &_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = c2;
	_tmp14_ = proton_plus_widgets_mango_hud_page_rgba_to_hex ((ProtonPlusWidgetsMangoHudPage*) self, &_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = c3;
	_tmp17_ = proton_plus_widgets_mango_hud_page_rgba_to_hex ((ProtonPlusWidgetsMangoHudPage*) self, &_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = g_strdup_printf ("%s,%s,%s", _tmp12_, _tmp15_, _tmp18_);
	_tmp20_ = _tmp19_;
	proton_plus_utils_mango_hud_manager_set_fps_limit_colors (_tmp9_, _tmp20_);
	_g_free0 (_tmp20_);
	_g_free0 (_tmp18_);
	_g_free0 (_tmp15_);
	_g_free0 (_tmp12_);
	g_signal_emit_by_name ((ProtonPlusWidgetsMangoHudPage*) self, "changed");
}

static void
proton_plus_widgets_mango_hud_performance_page_refresh_fps_limit_color_btns (ProtonPlusWidgetsMangoHudPerformancePage* self)
{
	gchar** fps_limit_colors = NULL;
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint fps_limit_colors_length1;
	gint _fps_limit_colors_size_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_utils_mango_hud_manager_get_fps_limit_colors (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp5_ = _tmp4_ = g_strsplit (_tmp3_, ",", 0);
	fps_limit_colors = _tmp5_;
	fps_limit_colors_length1 = _vala_array_length (_tmp4_);
	_fps_limit_colors_size_ = fps_limit_colors_length1;
	_tmp6_ = fps_limit_colors;
	_tmp6__length1 = fps_limit_colors_length1;
	if (_tmp6__length1 == 3) {
		GtkColorDialogButton* _tmp7_;
		gchar** _tmp8_;
		gint _tmp8__length1;
		const gchar* _tmp9_;
		GdkRGBA _tmp10_ = {0};
		GtkColorDialogButton* _tmp11_;
		gchar** _tmp12_;
		gint _tmp12__length1;
		const gchar* _tmp13_;
		GdkRGBA _tmp14_ = {0};
		GtkColorDialogButton* _tmp15_;
		gchar** _tmp16_;
		gint _tmp16__length1;
		const gchar* _tmp17_;
		GdkRGBA _tmp18_ = {0};
		_tmp7_ = self->priv->fps_limit_color_1_btn;
		_tmp8_ = fps_limit_colors;
		_tmp8__length1 = fps_limit_colors_length1;
		_tmp9_ = _tmp8_[0];
		proton_plus_widgets_mango_hud_page_hex_to_rgba ((ProtonPlusWidgetsMangoHudPage*) self, _tmp9_, "#ffffff", &_tmp10_);
		gtk_color_dialog_button_set_rgba (_tmp7_, &_tmp10_);
		_tmp11_ = self->priv->fps_limit_color_2_btn;
		_tmp12_ = fps_limit_colors;
		_tmp12__length1 = fps_limit_colors_length1;
		_tmp13_ = _tmp12_[1];
		proton_plus_widgets_mango_hud_page_hex_to_rgba ((ProtonPlusWidgetsMangoHudPage*) self, _tmp13_, "#ffffff", &_tmp14_);
		gtk_color_dialog_button_set_rgba (_tmp11_, &_tmp14_);
		_tmp15_ = self->priv->fps_limit_color_3_btn;
		_tmp16_ = fps_limit_colors;
		_tmp16__length1 = fps_limit_colors_length1;
		_tmp17_ = _tmp16_[2];
		proton_plus_widgets_mango_hud_page_hex_to_rgba ((ProtonPlusWidgetsMangoHudPage*) self, _tmp17_, "#ffffff", &_tmp18_);
		gtk_color_dialog_button_set_rgba (_tmp15_, &_tmp18_);
	}
	fps_limit_colors = (_vala_array_free (fps_limit_colors, fps_limit_colors_length1, (GDestroyNotify) g_free), NULL);
}

static void
proton_plus_widgets_mango_hud_performance_page_class_init (ProtonPlusWidgetsMangoHudPerformancePageClass * klass,
                                                           gpointer klass_data)
{
	proton_plus_widgets_mango_hud_performance_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsMangoHudPerformancePage_private_offset);
	((ProtonPlusWidgetsMangoHudPageClass *) klass)->refresh = (void (*) (ProtonPlusWidgetsMangoHudPage*)) proton_plus_widgets_mango_hud_performance_page_real_refresh;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_mango_hud_performance_page_finalize;
}

static void
proton_plus_widgets_mango_hud_performance_page_instance_init (ProtonPlusWidgetsMangoHudPerformancePage * self,
                                                              gpointer klass)
{
	self->priv = proton_plus_widgets_mango_hud_performance_page_get_instance_private (self);
}

static void
proton_plus_widgets_mango_hud_performance_page_finalize (GObject * obj)
{
	ProtonPlusWidgetsMangoHudPerformancePage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_MANGO_HUD_TYPE_PERFORMANCE_PAGE, ProtonPlusWidgetsMangoHudPerformancePage);
	_g_object_unref0 (self->priv->fps_row);
	_g_object_unref0 (self->priv->fps_avg_row);
	_g_object_unref0 (self->priv->fps_limit_stats_row);
	_g_object_unref0 (self->priv->frametime_row);
	_g_object_unref0 (self->priv->frame_count_row);
	_g_object_unref0 (self->priv->vps_row);
	_g_object_unref0 (self->priv->ftrace_row);
	_g_object_unref0 (self->priv->vsync_row);
	_g_object_unref0 (self->priv->gl_vsync_row);
	_g_object_unref0 (self->priv->fps_limit_row);
	_g_object_unref0 (self->priv->fps_limit_offset_row);
	_g_object_unref0 (self->priv->change_fps_limit_colors_row);
	_g_object_unref0 (self->priv->fps_limit_color_1_btn);
	_g_object_unref0 (self->priv->fps_limit_color_2_btn);
	_g_object_unref0 (self->priv->fps_limit_color_3_btn);
	_g_object_unref0 (self->priv->fps_limit_method_row);
	_g_object_unref0 (self->priv->toggle_fps_limit_row);
	_g_object_unref0 (self->priv->picmip_row);
	_g_object_unref0 (self->priv->af_row);
	_g_object_unref0 (self->priv->af_scale);
	_g_object_unref0 (self->priv->lod_bias_row);
	_g_object_unref0 (self->priv->lod_bias_scale);
	G_OBJECT_CLASS (proton_plus_widgets_mango_hud_performance_page_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_mango_hud_performance_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsMangoHudPerformancePageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_mango_hud_performance_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsMangoHudPerformancePage), 0, (GInstanceInitFunc) proton_plus_widgets_mango_hud_performance_page_instance_init, NULL };
	GType proton_plus_widgets_mango_hud_performance_page_type_id;
	proton_plus_widgets_mango_hud_performance_page_type_id = g_type_register_static (PROTON_PLUS_WIDGETS_MANGO_HUD_TYPE_PAGE, "ProtonPlusWidgetsMangoHudPerformancePage", &g_define_type_info, 0);
	ProtonPlusWidgetsMangoHudPerformancePage_private_offset = g_type_add_instance_private (proton_plus_widgets_mango_hud_performance_page_type_id, sizeof (ProtonPlusWidgetsMangoHudPerformancePagePrivate));
	return proton_plus_widgets_mango_hud_performance_page_type_id;
}

GType
proton_plus_widgets_mango_hud_performance_page_get_type (void)
{
	static volatile gsize proton_plus_widgets_mango_hud_performance_page_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_mango_hud_performance_page_type_id__once)) {
		GType proton_plus_widgets_mango_hud_performance_page_type_id;
		proton_plus_widgets_mango_hud_performance_page_type_id = proton_plus_widgets_mango_hud_performance_page_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_mango_hud_performance_page_type_id__once, proton_plus_widgets_mango_hud_performance_page_type_id);
	}
	return proton_plus_widgets_mango_hud_performance_page_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

