00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "config_wcrdisplay.h"
00020 #include "wcrGraphicsPipe.h"
00021 #include "wcrGraphicsWindow.h"
00022
00023 #include <dconfig.h>
00024
00025 Configure(config_wcrdisplay);
00026 NotifyCategoryDef(wcrdisplay, "display");
00027
00028 ConfigureFn(config_wcrdisplay) {
00029 init_libwcrdisplay();
00030 }
00031
00032
00033
00034
00035 bool gl_sync_video = config_wcrdisplay.GetBool("sync-video", true);
00036
00037 bool gl_show_fps_meter = config_wcrdisplay.GetBool("show-fps-meter", false);
00038 float gl_fps_meter_update_interval = max(0.5,config_wcrdisplay.GetFloat("fps-meter-update-interval", 1.7));
00039 int gl_forced_pixfmt=config_wcrdisplay.GetInt("gl-force-pixfmt", 0);
00040
00041 bool bResponsive_minimized_fullscreen_window = config_wcrdisplay.GetBool("responsive-minimized-fullscreen-window",false);
00042
00043
00044
00045 bool support_wiregl = config_wcrdisplay.GetBool("support-wiregl", false);
00046
00047 extern void AtExitFn();
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 void
00058 init_libwcrdisplay() {
00059 static bool initialized = false;
00060 if (initialized) {
00061 return;
00062 }
00063 initialized = true;
00064
00065 wcrGraphicsPipe::init_type();
00066 GraphicsPipe::get_factory().register_factory(
00067 wcrGraphicsPipe::get_class_type(),
00068 wcrGraphicsPipe::make_wcrGraphicsPipe);
00069 wcrGraphicsWindow::init_type();
00070 GraphicsWindow::get_factory().register_factory(
00071 wcrGraphicsWindow::get_class_type(),
00072 wcrGraphicsWindow::make_wcrGraphicsWindow);
00073
00074 atexit(AtExitFn);
00075 }
00076
00077
00078 Filename get_icon_filename_2() {
00079 string iconname = config_wcrdisplay.GetString("win32-window-icon","");
00080 return ExecutionEnvironment::expand_string(iconname);
00081 }
00082
00083 Filename get_color_cursor_filename_2() {
00084 string cursorname = config_wcrdisplay.GetString("win32-color-cursor","");
00085 return ExecutionEnvironment::expand_string(cursorname);
00086 }
00087
00088 Filename get_mono_cursor_filename_2() {
00089 string cursorname = config_wcrdisplay.GetString("win32-mono-cursor","");
00090 return ExecutionEnvironment::expand_string(cursorname);
00091 }