MCPcopy Create free account
hub / github.com/JHRobotics/softgpu / settingsApply

Function settingsApply

settings.c:129–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void settingsApply(HWND hwnd)
130{
131 settings_item_t *item;
132
133 for(item = &settings_cur[0]; item->menu != 0; item++)
134 {
135 HWND hItem = GetDlgItem(hwnd, item->menu);
136 if(hItem)
137 {
138 switch(item->type)
139 {
140 case T_RADIO:
141 case T_CHECKBOX:
142 if(item->disabled)
143 {
144 CheckDlgButton(hwnd, item->menu, BST_UNCHECKED);
145 LONG sty = GetWindowLongA(hItem, GWL_STYLE) | WS_DISABLED;
146 SetWindowLongA(hItem, GWL_STYLE, sty);
147 }
148 else
149 {
150 LONG sty = GetWindowLongA(hItem, GWL_STYLE) & (~WS_DISABLED);
151 SetWindowLongA(hItem, GWL_STYLE, sty);
152
153 if(item->dvalue)
154 CheckDlgButton(hwnd, item->menu, BST_CHECKED);
155 else
156 CheckDlgButton(hwnd, item->menu, BST_UNCHECKED);
157 }
158 break;
159 case T_INPUT_NUM:
160 {
161 char inp[64];
162 sprintf(inp, "%u", item->dvalue);
163 SetWindowTextA(hItem, inp);
164 break;
165 }
166 case T_INPUT_STR:
167 SetWindowTextA(hItem, item->svalue);
168 break;
169 case T_DROPDOWN:
170 SendMessage(hItem, (UINT)CB_SETCURSEL, (WPARAM)item->dvalue, (LPARAM)0);
171 break;
172 }
173 }
174 }
175}
176
177void settingsReadback(HWND hwnd)
178{

Callers 3

softgpuWndProcFunction · 0.85
softgpu_window_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected