DXGL r696 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r695‎ | r696 | r697 >
Date:04:31, 5 March 2017
Author:admin
Status:new
Tags:
Comment:
Begin rewriting DrawPrimitives.
Add 1st pass scaling to dxglcfg dialog resources.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)
  • /ddraw/glRenderer.h (modified) (history)
  • /dxglcfg/dxglcfg.c (modified) (history)
  • /dxglcfg/dxglcfg.rc (modified) (history)
  • /dxglcfg/resource.h (modified) (history)
  • /dxglcfg2/dxglcfg2.rc (modified) (history)
  • /dxglcfg2/resource.h (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -1450,6 +1450,11 @@
14511451 tmp_cmd.SetMode3D.enable = TRUE;
14521452 glRenderer_AddCommand(This, &tmp_cmd, TRUE, FALSE);
14531453 }
 1454+ if((This->state.last_cmd.DrawPrimitives.opcode == OP_DRAWPRIMITIVES) &&
 1455+ (cmd->DrawPrimitives.mode == This->state.last_cmd.DrawPrimitives.mode) &&
 1456+ (cmd->DrawPrimitives.target == This->state.last_cmd.DrawPrimitives.target) &&
 1457+ !memcmp(cmd->DrawPrimitives.texformats, This->state.last_cmd.DrawPrimitives.texformats, 8 * sizeof(int)))
 1458+ {}
14541459 // check for zbuffer on target
14551460 // check if transformed
14561461 // if no vertex positions fail
@@ -1670,6 +1675,8 @@
16711676 This->hDC = NULL;
16721677 This->hRC = NULL;
16731678 This->pbo = NULL;
 1679+ This->last_fvf = 0xFFFFFFFF; // Bogus value to force initial FVF change
 1680+ This->mode_3d = FALSE;
16741681 ZeroMemory(&This->dib, sizeof(DIB));
16751682 This->hWnd = hwnd;
16761683 InitializeCriticalSection(&This->cs);
@@ -2513,8 +2520,8 @@
25142521 glTexture_Release(This->backbuffer, TRUE);
25152522 This->backbuffer = NULL;
25162523 }
2517 - glRenderer__DeleteCommandBuffer(&This->cmd1);
2518 - glRenderer__DeleteCommandBuffer(&This->cmd2);
 2524+ //glRenderer__DeleteCommandBuffer(&This->cmd1);
 2525+ //glRenderer__DeleteCommandBuffer(&This->cmd2);
25192526 ShaderManager_Delete(This->shaders);
25202527 glUtil_Release(This->util);
25212528 free(This->shaders);
@@ -2569,7 +2576,7 @@
25702577 glRenderer__Flush(This);
25712578 break;
25722579 case OP_DRAWPRIMITIVES:
2573 - glRenderer__DrawPrimitives(This,(RenderTarget*)&This->inputs[8],(GLenum)This->inputs[1],
 2580+ glRenderer__DrawPrimitivesOld(This,(RenderTarget*)&This->inputs[8],(GLenum)This->inputs[1],
25742581 (GLVERTEX*)This->inputs[2],(int*)This->inputs[3],(DWORD)This->inputs[4],(LPWORD)This->inputs[5],
25752582 (DWORD)This->inputs[6],(DWORD)This->inputs[7]);
25762583 break;
@@ -2773,10 +2780,10 @@
27742781 BufferObject_SetData(This->pbo, GL_PIXEL_PACK_BUFFER, width*height * 4, NULL, GL_STREAM_READ);
27752782 ZeroMemory(&This->state, sizeof(RenderState));
27762783 This->state.cmd = &This->cmd1;
2777 - glRenderer__InitCommandBuffer(This, &This->cmd1, width * height * (NextMultipleOf8(bpp) / 8));
2778 - glRenderer__InitCommandBuffer(This, &This->cmd2, width * height * (NextMultipleOf8(bpp) / 8));
2779 - BufferObject_Map(This->cmd1.vertices, GL_ARRAY_BUFFER, GL_WRITE_ONLY);
2780 - BufferObject_Map(This->cmd1.indices, GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
 2784+ //glRenderer__InitCommandBuffer(This, &This->cmd1, width * height * (NextMultipleOf8(bpp) / 8));
 2785+ //glRenderer__InitCommandBuffer(This, &This->cmd2, width * height * (NextMultipleOf8(bpp) / 8));
 2786+ //BufferObject_Map(This->cmd1.vertices, GL_ARRAY_BUFFER, GL_WRITE_ONLY);
 2787+ //BufferObject_Map(This->cmd1.indices, GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
27812788 TRACE_SYSINFO();
27822789 return TRUE;
27832790 }
@@ -3795,14 +3802,31 @@
37963803 glUtil_BlendFunc(This->util, glsrc, gldest);
37973804 }
37983805
3799 -void glRenderer__DrawPrimitives(glRenderer *This, RenderTarget *target, GLenum mode, GLVERTEX *vertices, int *texformats, DWORD count, LPWORD indices,
 3806+void glRenderer__UpdateFVF(glRenderer *This, DWORD fvf)
 3807+{
 3808+}
 3809+
 3810+void glRenderer__DrawPrimitives(glRenderer *This, RenderTarget *target, GLenum mode, DWORD fvf,
 3811+ void *vertices, BOOL strided, DWORD count, LPWORD indices, DWORD indexcount, DWORD flags)
 3812+{
 3813+ BOOL transformed;
 3814+ int i;
 3815+ glTexture *ztexture = NULL;
 3816+ GLint zleve = 0;
 3817+ if (!vertices)
 3818+ {
 3819+ This->outputs[0] = (void*)DDERR_INVALIDPARAMS;
 3820+ SetEvent(This->busy);
 3821+ return;
 3822+ }
 3823+ if (fvf != This->last_fvf) glRenderer__UpdateFVF(This, fvf);
 3824+
 3825+}
 3826+
 3827+void glRenderer__DrawPrimitivesOld(glRenderer *This, RenderTarget *target, GLenum mode, GLVERTEX *vertices, int *texformats, DWORD count, LPWORD indices,
38003828 DWORD indexcount, DWORD flags)
38013829 {
38023830 bool transformed;
3803 - char svar[] = "sX";
3804 - char stvar[] = "stX";
3805 - char strvar[] = "strX";
3806 - char strqvar[] = "strqX";
38073831 int i;
38083832 glTexture *ztexture = NULL;
38093833 GLint zlevel = 0;
@@ -4668,4 +4692,9 @@
46694693 if (wait) SetEvent(This->busy);
46704694 }
46714695
 4696+void glRenderer__SetMode3D(glRenderer *This, BOOL enabled)
 4697+{
 4698+// TODO: Set 3D mode
 4699+}
 4700+
46724701 }
\ No newline at end of file
Index: ddraw/glRenderer.h
@@ -156,6 +156,8 @@
157157 float mulx, muly;
158158 RenderState state;
159159 size_t scenesize, scenesizevertex, scenesizeindex;
 160+ DWORD last_fvf;
 161+ BOOL mode_3d;
160162 } glRenderer;
161163
162164 HRESULT glRenderer_AddCommand(glRenderer *This, QueueCmd *cmd, BOOL inner, BOOL wait);
@@ -207,7 +209,10 @@
208210 void glRenderer__DrawBackbufferRect(glRenderer *This, glTexture *texture, RECT srcrect, int progtype);
209211 void glRenderer__InitD3D(glRenderer *This, int zbuffer, int x, int y);
210212 void glRenderer__Clear(glRenderer *This, ClearCommand *cmd);
211 -void glRenderer__DrawPrimitives(glRenderer *This, RenderTarget *target, GLenum mode, GLVERTEX *vertices, int *texcormats, DWORD count, LPWORD indices,
 213+void glRenderer__UpdateFVF(glRenderer *This, DWORD fvf);
 214+void glRenderer__DrawPrimitives(glRenderer *This, RenderTarget *target, GLenum mode, DWORD fvf,
 215+ void *vertices, BOOL strided, DWORD count, LPWORD indices, DWORD indexcount, DWORD flags);
 216+void glRenderer__DrawPrimitivesOld(glRenderer *This, RenderTarget *target, GLenum mode, GLVERTEX *vertices, int *texcormats, DWORD count, LPWORD indices,
212217 DWORD indexcount, DWORD flags);
213218 void glRenderer__Flush(glRenderer *This);
214219 void glRenderer__SetWnd(glRenderer *This, int width, int height, int fullscreen, int bpp, unsigned int frequency, HWND newwnd, BOOL devwnd);
@@ -235,6 +240,7 @@
236241 void glRenderer__SetDepthComp(glRenderer *This);
237242 void glRenderer__DXGLBreak(glRenderer *This);
238243 void glRenderer__EndCommand(glRenderer *This, BOOL wait);
 244+void glRenderer__SetMode3D(glRenderer *This, BOOL enabled);
239245
240246 void BltFlipLR(BltVertex *vertices);
241247 void BltFlipUD(BltVertex *vertices);
Index: dxglcfg/dxglcfg.c
@@ -734,8 +734,6 @@
735735 // extra modes
736736 if(cfg->AddModes) SendDlgItemMessage(hWnd,IDC_EXTRAMODES,BM_SETCHECK,BST_CHECKED,0);
737737 else SendDlgItemMessage(hWnd,IDC_EXTRAMODES,BM_SETCHECK,BST_UNCHECKED,0);
738 - // shader path
739 - SetText(hWnd,IDC_SHADER,cfg->shaderfile,cfgmask->shaderfile,FALSE);
740738 // texture format
741739 _tcscpy(buffer,_T("Automatic"));
742740 SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_ADDSTRING,0,(LPARAM)buffer);
@@ -1075,7 +1073,6 @@
10761074 SetCombo(hWnd,IDC_TEXTUREFORMAT,cfg->TextureFormat,cfgmask->TextureFormat,tristate);
10771075 SetCombo(hWnd,IDC_TEXUPLOAD,cfg->TexUpload,cfgmask->TexUpload,tristate);
10781076 SetCheck(hWnd,IDC_EXTRAMODES,cfg->AddModes,cfgmask->AddModes,tristate);
1079 - SetText(hWnd,IDC_SHADER,cfg->shaderfile,cfgmask->shaderfile,tristate);
10801077 SetCombo(hWnd, IDC_DPISCALE, cfg->DPIScale, cfgmask->DPIScale, tristate);
10811078 SetAspectCombo(hWnd, IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
10821079 }
@@ -1160,14 +1157,6 @@
11611158 EnableWindow(GetDlgItem(hWnd, IDC_APPLY), TRUE);
11621159 *dirty = TRUE;
11631160 break;
1164 - case IDC_SHADER:
1165 - if(HIWORD(wParam) == EN_CHANGE)
1166 - {
1167 - GetText(hWnd,IDC_SHADER,cfg->shaderfile,cfgmask->shaderfile);
1168 - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
1169 - *dirty = TRUE;
1170 - }
1171 - break;
11721161 case IDC_ASPECT:
11731162 if (HIWORD(wParam) == CBN_KILLFOCUS)
11741163 {
Index: dxglcfg/dxglcfg.rc
@@ -1,5 +1,5 @@
22 // DXGL
3 -// Copyright (C) 2011-2012 William Feely
 3+// Copyright (C) 2011-2017 William Feely
44
55 // This library is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU Lesser General Public
@@ -33,48 +33,49 @@
3434 CAPTION "DXGL Config"
3535 FONT 8, "Ms Shell Dlg 2"
3636 {
37 - DEFPUSHBUTTON "OK", IDOK, 247, 247, 50, 14
38 - PUSHBUTTON "Cancel", IDCANCEL, 299, 247, 50, 14
39 - LTEXT "", IDC_STATIC, 4, 244, 397, 1, SS_LEFT | SS_SUNKEN
40 - PUSHBUTTON "&Apply", IDC_APPLY, 351, 247, 50, 14, WS_DISABLED
41 - LISTBOX IDC_APPS, 4, 14, 181, 212, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_OWNERDRAWFIXED | LBS_NOTIFY
42 - LTEXT "Applications", IDC_STATIC, 4, 4, 39, 8, SS_LEFT
43 - PUSHBUTTON "A&dd...", IDC_ADD, 4, 228, 90, 14
44 - PUSHBUTTON "&Remove", IDC_REMOVE, 96, 228, 90, 14, WS_DISABLED
45 - GROUPBOX "Graphics", IDC_STATIC, 190, 4, 211, 238
46 - LTEXT "Video mode", IDC_STATIC, 195, 14, 38, 8, SS_LEFT
47 - COMBOBOX IDC_VIDMODE, 195, 24, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
48 - AUTOCHECKBOX "Change display color depth", IDC_COLOR, 299, 14, 100, 10
49 - LTEXT "Scaling method", IDC_STATIC, 195, 69, 49, 8, SS_LEFT
50 - COMBOBOX IDC_SCALE, 195, 79, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
51 - LTEXT "Fullscreen window mode", IDC_STATIC, 299, 69, 78, 8, SS_LEFT
52 - COMBOBOX IDC_FULLMODE, 299, 79, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
53 - LTEXT "Post-processing shader", IDC_STATIC, 195, 94, 90, 8, SS_LEFT
54 - EDITTEXT IDC_SHADER, 195, 104, 183, 14, ES_AUTOHSCROLL
55 - PUSHBUTTON "...", IDC_BROWSESHADER, 379, 104, 20, 14
56 - LTEXT "Screen aspect ratio", IDC_STATIC, 195, 120, 63, 8, SS_LEFT
57 - LTEXT "DPI scaling mode", IDC_STATIC, 299, 120, 55, 8, SS_LEFT
58 - COMBOBOX IDC_ASPECT, 195, 130, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS
59 - COMBOBOX IDC_DPISCALE, 299, 130, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
60 - LTEXT "Texture filter", IDC_STATIC, 195, 145, 43, 8, SS_LEFT
61 - COMBOBOX IDC_TEXFILTER, 195, 155, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
62 - LTEXT "Anisotropic filtering", IDC_STATIC, 299, 145, 62, 8, SS_LEFT
63 - COMBOBOX IDC_ANISO, 299, 155, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
64 - LTEXT "Antialiasing (MSAA)", IDC_STATIC, 195, 170, 63, 8, SS_LEFT
65 - COMBOBOX IDC_MSAA, 195, 180, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
66 - LTEXT "Renderer aspect ratio", IDC_STATIC, 299, 170, 71, 8, SS_LEFT
67 - COMBOBOX IDC_ASPECT3D, 299, 180, 100, 14, CBS_DROPDOWNLIST | CBS_HASSTRINGS
68 - AUTOCHECKBOX "Adjust primary resolution", IDC_HIGHRES, 299, 28, 96, 8
69 - AUTOCHECKBOX "Support all color depths", IDC_UNCOMMONCOLOR, 299, 55, 91, 8
70 - AUTOCHECKBOX "Add extra display modes", IDC_EXTRAMODES, 299, 42, 95, 8
71 - LTEXT "Sort video modes", IDC_STATIC, 195, 39, 56, 8, SS_LEFT
72 - COMBOBOX IDC_SORTMODES, 195, 49, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
73 - LTEXT "Texture format", IDC_STATIC, 195, 195, 50, 8, SS_LEFT
74 - COMBOBOX IDC_TEXTUREFORMAT, 195, 205, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
75 - LTEXT "Texture access method", IDC_STATIC, 299, 195, 76, 8, SS_LEFT
76 - COMBOBOX IDC_TEXUPLOAD, 299, 205, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
77 - EDITTEXT IDC_PROFILEPATH, 215, 227, 184, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY, WS_EX_LEFT
78 - LTEXT "Path:", IDC_PATHLABEL, 196, 227, 18, 9, SS_LEFT, WS_EX_LEFT
 37+ DEFPUSHBUTTON "OK", IDOK, 247, 243, 50, 14, 0, WS_EX_LEFT
 38+ PUSHBUTTON "Cancel", IDCANCEL, 299, 243, 50, 14, 0, WS_EX_LEFT
 39+ LTEXT "", IDC_STATIC, 4, 240, 397, 1, SS_LEFT | SS_SUNKEN, WS_EX_LEFT
 40+ PUSHBUTTON "&Apply", IDC_APPLY, 351, 243, 50, 14, WS_DISABLED, WS_EX_LEFT
 41+ LISTBOX IDC_APPS, 4, 14, 181, 208, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_OWNERDRAWFIXED | LBS_NOTIFY, WS_EX_LEFT
 42+ LTEXT "Applications", IDC_STATIC, 4, 4, 39, 8, SS_LEFT, WS_EX_LEFT
 43+ PUSHBUTTON "A&dd...", IDC_ADD, 4, 224, 90, 14, 0, WS_EX_LEFT
 44+ PUSHBUTTON "&Remove", IDC_REMOVE, 96, 224, 90, 14, WS_DISABLED, WS_EX_LEFT
 45+ GROUPBOX "Graphics", IDC_STATIC, 190, 4, 211, 234, 0, WS_EX_LEFT
 46+ LTEXT "Video mode", IDC_STATIC, 195, 14, 38, 8, SS_LEFT, WS_EX_LEFT
 47+ COMBOBOX IDC_VIDMODE, 195, 24, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 48+ AUTOCHECKBOX "Change display color depth", IDC_COLOR, 299, 14, 100, 10, 0, WS_EX_LEFT
 49+ LTEXT "Scaling method (final pass)", IDC_STATIC, 196, 90, 86, 9, SS_LEFT, WS_EX_LEFT
 50+ COMBOBOX IDC_SCALE, 196, 101, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 51+ LTEXT "Fullscreen window mode", IDC_STATIC, 299, 90, 78, 8, SS_LEFT, WS_EX_LEFT
 52+ COMBOBOX IDC_FULLMODE, 299, 101, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 53+ LTEXT "Scaling method (1st pass)", IDC_STATIC, 196, 64, 83, 9, SS_LEFT, WS_EX_LEFT
 54+ COMBOBOX IDC_PRESCALE, 196, 75, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 55+ COMBOBOX IDC_PRESCALESIZE, 299, 75, 100, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
 56+ LTEXT "1st Pass Scale size", 0, 299, 64, 60, 9, SS_LEFT, WS_EX_LEFT
 57+ LTEXT "Screen aspect ratio", IDC_STATIC, 196, 116, 63, 8, SS_LEFT, WS_EX_LEFT
 58+ LTEXT "Windows DPI scaling mode", IDC_STATIC, 299, 116, 86, 9, SS_LEFT, WS_EX_LEFT
 59+ COMBOBOX IDC_ASPECT, 196, 126, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
 60+ COMBOBOX IDC_DPISCALE, 299, 126, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 61+ LTEXT "Texture filter", IDC_STATIC, 196, 141, 43, 8, SS_LEFT, WS_EX_LEFT
 62+ COMBOBOX IDC_TEXFILTER, 196, 151, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 63+ LTEXT "Anisotropic filtering", IDC_STATIC, 299, 141, 62, 8, SS_LEFT, WS_EX_LEFT
 64+ COMBOBOX IDC_ANISO, 299, 151, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 65+ LTEXT "Antialiasing (MSAA)", IDC_STATIC, 196, 166, 63, 8, SS_LEFT, WS_EX_LEFT
 66+ COMBOBOX IDC_MSAA, 196, 176, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 67+ LTEXT "Renderer aspect ratio", IDC_STATIC, 299, 166, 71, 8, SS_LEFT, WS_EX_LEFT
 68+ COMBOBOX IDC_ASPECT3D, 299, 176, 100, 14, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 69+ AUTOCHECKBOX "Adjust primary resolution", IDC_HIGHRES, 299, 27, 96, 8, 0, WS_EX_LEFT
 70+ AUTOCHECKBOX "Support all color depths", IDC_UNCOMMONCOLOR, 299, 53, 91, 8, 0, WS_EX_LEFT
 71+ AUTOCHECKBOX "Add extra display modes", IDC_EXTRAMODES, 299, 40, 95, 8, 0, WS_EX_LEFT
 72+ LTEXT "Sort video modes", IDC_STATIC, 195, 39, 56, 8, SS_LEFT, WS_EX_LEFT
 73+ COMBOBOX IDC_SORTMODES, 195, 49, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 74+ LTEXT "Texture format", IDC_STATIC, 196, 191, 50, 8, SS_LEFT, WS_EX_LEFT
 75+ COMBOBOX IDC_TEXTUREFORMAT, 196, 201, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 76+ LTEXT "Texture access method", IDC_STATIC, 301, 191, 76, 8, SS_LEFT, WS_EX_LEFT
 77+ COMBOBOX IDC_TEXUPLOAD, 300, 201, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 78+ EDITTEXT IDC_PROFILEPATH, 215, 223, 184, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY, WS_EX_LEFT
 79+ LTEXT "Path:", IDC_PATHLABEL, 196, 223, 18, 9, SS_LEFT, WS_EX_LEFT
7980 }
8081
8182
Index: dxglcfg/resource.h
@@ -1,5 +1,5 @@
22 // DXGL
3 -// Copyright (C) 2011-2012 William Feely
 3+// Copyright (C) 2011-2017 William Feely
44
55 // This library is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU Lesser General Public
@@ -34,8 +34,8 @@
3535 #define IDC_VIDMODE 1041
3636 #define IDC_SCALE 1042
3737 #define IDC_FULLMODE 1043
38 -#define IDC_SHADER 1044
39 -#define IDC_BROWSESHADER 1045
 38+#define IDC_PRESCALESIZE 1044
 39+#define IDC_PRESCALE 1045
4040 #define IDC_TEXFILTER 1046
4141 #define IDC_ANISO 1047
4242 #define IDC_MSAA 1048
Index: dxglcfg2/dxglcfg2.rc
@@ -1,5 +1,5 @@
22 // DXGL
3 -// Copyright (C) 2011-2015 William Feely
 3+// Copyright (C) 2011-2017 William Feely
44
55 // This library is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU Lesser General Public
@@ -38,27 +38,31 @@
3939 COMBOBOX IDC_VIDMODE, 7, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
4040 LTEXT "Add color depths", IDC_STATIC, 114, 7, 54, 8, SS_LEFT, WS_EX_LEFT
4141 COMBOBOX IDC_COLORDEPTH, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
42 - LTEXT "Scaling method", IDC_STATIC, 7, 32, 49, 8, SS_LEFT, WS_EX_LEFT
43 - COMBOBOX IDC_SCALE, 7, 42, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
44 - LTEXT "Additional display modes", 0, 114, 32, 78, 8, SS_LEFT, WS_EX_LEFT
45 - COMBOBOX IDC_EXTRAMODES, 114, 42, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED, WS_EX_LEFT
46 - LTEXT "Fixed scaling", IDC_FIXEDSCALELABEL, 7, 57, 47, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
47 - LTEXT "X", IDC_FIXEDSCALELABELX, 7, 70, 6, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
48 - EDITTEXT IDC_FIXEDSCALEX, 15, 67, 24, 14, ES_AUTOHSCROLL, WS_EX_LEFT
49 - LTEXT "Y", IDC_FIXEDSCALELABELY, 44, 70, 6, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
50 - EDITTEXT IDC_FIXEDSCALEY, 52, 67, 24, 14, ES_AUTOHSCROLL, WS_EX_LEFT
51 - AUTOCHECKBOX "Square", IDC_FIXEDSCALESQUARE, 81, 67, 29, 14, BS_PUSHLIKE, WS_EX_LEFT
52 - LTEXT "Sort video modes", IDC_STATIC, 114, 57, 56, 8, SS_LEFT, WS_EX_LEFT
53 - COMBOBOX IDC_SORTMODES, 114, 67, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 42+ LTEXT "Scaling method (final pass)", IDC_STATIC, 7, 57, 85, 9, SS_LEFT, WS_EX_LEFT
 43+ COMBOBOX IDC_SCALE, 7, 67, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 44+ LTEXT "Additional display modes", 0, 114, 57, 78, 8, SS_LEFT, WS_EX_LEFT
 45+ COMBOBOX IDC_EXTRAMODES, 114, 67, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED, WS_EX_LEFT
 46+ LTEXT "Fixed scaling", IDC_FIXEDSCALELABEL, 113, 133, 47, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
 47+ LTEXT "X", IDC_FIXEDSCALELABELX, 113, 146, 8, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
 48+ EDITTEXT IDC_FIXEDSCALEX, 121, 143, 24, 14, ES_AUTOHSCROLL, WS_EX_LEFT
 49+ LTEXT "Y", IDC_FIXEDSCALELABELY, 150, 146, 8, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
 50+ EDITTEXT IDC_FIXEDSCALEY, 158, 143, 24, 14, ES_AUTOHSCROLL, WS_EX_LEFT
 51+ AUTOCHECKBOX "Square", IDC_FIXEDSCALESQUARE, 187, 143, 29, 14, BS_PUSHLIKE, WS_EX_LEFT
 52+ LTEXT "Sort video modes", IDC_STATIC, 114, 82, 56, 8, SS_LEFT, WS_EX_LEFT
 53+ COMBOBOX IDC_SORTMODES, 114, 92, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
5454 LTEXT "Screen aspect ratio", IDC_STATIC, 7, 82, 63, 8, SS_LEFT, WS_EX_LEFT
5555 COMBOBOX IDC_ASPECT, 7, 92, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
56 - LTEXT "Vertical sync", IDC_STATIC, 114, 82, 41, 8, SS_LEFT, WS_EX_LEFT
57 - COMBOBOX IDC_VSYNC, 114, 92, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 56+ LTEXT "Vertical sync", IDC_STATIC, 114, 107, 41, 8, SS_LEFT, WS_EX_LEFT
 57+ COMBOBOX IDC_VSYNC, 114, 117, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
5858 LTEXT "DPI scaling mode", IDC_STATIC, 7, 107, 55, 8, SS_LEFT, WS_EX_LEFT
5959 COMBOBOX IDC_DPISCALE, 7, 117, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
60 - AUTOCHECKBOX "Change display color depth", IDC_COLOR, 114, 118, 100, 10, 0, WS_EX_LEFT
 60+ AUTOCHECKBOX "Change display color depth", IDC_COLOR, 9, 158, 100, 10, 0, WS_EX_LEFT
6161 LTEXT "Fullscreen mode", IDC_STATIC, 7, 132, 78, 9, SS_LEFT, WS_EX_LEFT
6262 COMBOBOX IDC_FULLMODE, 8, 143, 101, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
 63+ LTEXT "Scaling method (1st pass)", IDC_STATIC, 7, 32, 83, 9, SS_LEFT, WS_EX_LEFT
 64+ COMBOBOX IDC_PRESCALE, 7, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 65+ LTEXT "1st Pass Scale size", 0, 114, 32, 60, 9, SS_LEFT, WS_EX_LEFT
 66+ COMBOBOX IDC_PRESCALESIZE, 114, 43, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
6367 }
6468
6569
Index: dxglcfg2/resource.h
@@ -1,3 +1,20 @@
 2+// DXGL
 3+// Copyright (C) 2011-2017 William Feely
 4+
 5+// This library is free software; you can redistribute it and/or
 6+// modify it under the terms of the GNU Lesser General Public
 7+// License as published by the Free Software Foundation; either
 8+// version 2.1 of the License, or (at your option) any later version.
 9+
 10+// This library is distributed in the hope that it will be useful,
 11+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 12+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 13+// Lesser General Public License for more details.
 14+
 15+// You should have received a copy of the GNU Lesser General Public
 16+// License along with this library; if not, write to the Free Software
 17+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 18+
219 #ifndef IDC_STATIC
320 #define IDC_STATIC (-1)
421 #endif
@@ -55,3 +72,5 @@
5673 #define IDC_FIXEDSCALESQUARE 1039
5774 #define IDC_LOWCOLORRENDER 1040
5875 #define IDC_FULLMODE 1041
 76+#define IDC_PRESCALE 1042
 77+#define IDC_PRESCALESIZE 1043