/[pcsx2_0.9.7]/trunk/plugins/zzogl-pg/opengl/Linux/Linux.cpp
ViewVC logotype

Contents of /trunk/plugins/zzogl-pg/opengl/Linux/Linux.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 2 months ago) by william
File size: 18594 byte(s)
re-commit (had local access denied errors when committing)
1 /* ZeroGS
2 * Copyright (C) 2002-2004 GSsoft Team
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #include <stdarg.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <gtk/gtk.h>
23 #include <dlfcn.h>
24
25 #include "GS.h"
26 #include "Linux.h"
27 #include "GLWin.h"
28
29 #include <map>
30
31 extern u32 THR_KeyEvent; // value for passing out key events beetwen threads
32 extern bool THR_bShift;
33
34 static map<string, confOptsStruct> mapConfOpts;
35 static gameHacks tempHacks;
36
37 void CALLBACK GSkeyEvent(keyEvent *ev)
38 {
39 //static bool bShift = false;
40 static bool bAlt = false;
41
42 switch (ev->evt)
43 {
44 case KEYPRESS:
45 switch (ev->key)
46 {
47 case XK_F5:
48 case XK_F6:
49 case XK_F7:
50 case XK_F9:
51 THR_KeyEvent = ev->key;
52 break;
53
54 case XK_Escape:
55 if (conf.fullscreen()) GLWin.ToggleFullscreen();
56 break;
57
58 case XK_Shift_L:
59 case XK_Shift_R:
60 //bShift = true;
61 THR_bShift = true;
62 break;
63
64 case XK_Alt_L:
65 case XK_Alt_R:
66 bAlt = true;
67 break;
68
69 case XK_Return:
70 if (bAlt)
71 GLWin.ToggleFullscreen();
72 }
73 break;
74
75 case KEYRELEASE:
76 switch (ev->key)
77 {
78 case XK_Shift_L:
79 case XK_Shift_R:
80 //bShift = false;
81 THR_bShift = false;
82 break;
83
84 case XK_Alt_L:
85 case XK_Alt_R:
86 bAlt = false;
87 break;
88 }
89 }
90 }
91
92 void add_map_entry(u32 option, const char *key, const char *desc)
93 {
94 confOpts.value = option;
95 confOpts.desc = desc;
96 mapConfOpts[key] = confOpts;
97 }
98
99 void CreateGameHackTable(GtkWidget *treeview, gameHacks hacks)
100 {
101 char descbuf[255];
102 bool itval;
103 GtkCellRenderer *treerend;
104 GtkListStore *treestore;//Gets typecast as GtkTreeModel as needed.
105 GtkTreeIter treeiter;
106 GtkTreeViewColumn *treecol;
107
108 //--------- Let's build a treeview for our advanced options! --------//
109 treestore = gtk_list_store_new(2, G_TYPE_BOOLEAN, G_TYPE_STRING);
110
111 //setup columns in treeview
112 //COLUMN 0 is the checkboxes
113 treecol = gtk_tree_view_column_new();
114 gtk_tree_view_column_set_title(treecol, "Select");
115 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), treecol);
116 treerend = gtk_cell_renderer_toggle_new();
117 gtk_tree_view_column_pack_start(treecol, treerend, true);
118 gtk_tree_view_column_add_attribute(treecol, treerend, "active", 0);//link 'active' attrib to first column of model
119 g_object_set(treerend, "activatable", true, NULL);//set 'activatable' attrib true by default for all rows regardless of model.
120 g_signal_connect(treerend, "toggled", (GCallback) OnToggle_advopts, treestore);//set a global callback, we also pass a reference to our treestore.
121
122 //COLUMN 1 is the text descriptions
123 treecol = gtk_tree_view_column_new();
124 gtk_tree_view_column_set_title(treecol, "Description");
125 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), treecol);
126 treerend = gtk_cell_renderer_text_new();
127 gtk_tree_view_column_pack_start(treecol, treerend, true);
128 gtk_tree_view_column_add_attribute(treecol, treerend, "text", 1);//link 'text' attrib to second column of model
129
130 //setup the model with all our rows of option data
131 mapConfOpts.clear();
132
133 add_map_entry(GAME_TEXTURETARGS, "00000001", "Tex Target checking - 00000001\nLego Racers");
134 add_map_entry(GAME_AUTORESET, "00000002", "Auto reset targs - 00000002\nUse when game is slow and toggling AA fixes it. Samurai Warriors. (Automatically on for Shadow Hearts)");
135 add_map_entry(GAME_INTERLACE2X, "00000004", "Interlace 2X - 00000004\nFixes 2x bigger screen. Gradius 3.");
136 //GAME_TEXAHACK (still implemented)
137 add_map_entry(GAME_NOTARGETRESOLVE, "00000010", "No target resolves - 00000010\nStops all resolving of targets. Try this first for really slow games. (Automatically on for Dark Cloud 1.)");
138 add_map_entry(GAME_EXACTCOLOR, "00000020", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts. Crash 'n Burn.");
139 //add_map_entry(GAME_NOCOLORCLAMP, "00000040", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim.");
140 //GAME_FFXHACK
141 add_map_entry(GAME_NOALPHAFAIL, "00000100", "Alpha Fail hack - 00000100\nRemove vertical stripes or other coloring artifacts. Breaks Persona 4 and MGS3. (Automatically on for Sonic Unleashed, Shadow the Hedgehog, & Ghost in the Shell.)");
142 add_map_entry(GAME_NODEPTHUPDATE, "00000200", "Disable depth updates - 00000200");
143 add_map_entry(GAME_QUICKRESOLVE1, "00000400", "Resolve Hack #1 - 00000400\n Speeds some games. Kingdom Hearts.");
144 add_map_entry(GAME_NOQUICKRESOLVE, "00000800", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroys FFX.");
145 add_map_entry(GAME_NOTARGETCLUT, "00001000", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes.");
146 add_map_entry(GAME_NOSTENCIL, "00002000", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon.");
147 //GAME_VSSHACKOFF (still implemented)
148 add_map_entry(GAME_NODEPTHRESOLVE, "00008000", "No depth resolve - 00008000\nMight give z buffer artifacts.");
149 add_map_entry(GAME_FULL16BITRES, "00010000", "Full 16 bit resolution - 00010000\nUse when half the screen is missing.");
150 add_map_entry(GAME_RESOLVEPROMOTED, "00020000", "Resolve Hack #3 - 00020000\nNeopets");
151 add_map_entry(GAME_FASTUPDATE, "00040000", "Fast Update - 00040000\n Speeds some games. Needed for Sonic Unleashed. Okami.");
152 add_map_entry(GAME_NOALPHATEST, "00080000", "Disable alpha testing - 00080000");
153 add_map_entry(GAME_DISABLEMRTDEPTH, "00100000", "Enable Multiple RTs - 00100000");
154 //GAME_32BITTARGS
155 //GAME_PATH3HACK
156 //GAME_DOPARALLELCTX
157 add_map_entry(GAME_XENOSPECHACK, "01000000", "Specular Highlights - 01000000\nMakes graphics faster by removing highlights. (Automatically on for Xenosaga, Okami, & Okage.)");
158 //add_map_entry(GAME_PARTIALPOINTERS, "02000000", "Partial targets - 02000000");
159 add_map_entry(GAME_PARTIALDEPTH, "04000000", "Partial depth - 04000000");
160 //GAME_REGETHACK (commented out in code)
161 add_map_entry(GAME_GUSTHACK, "10000000", "Gust fix - 10000000. Makes gust games cleaner and faster. (Automatically on for most Gust games)");
162 add_map_entry(GAME_NOLOGZ, "20000000", "No logarithmic Z - 20000000. Could decrease number of Z-artifacts.");
163 add_map_entry(GAME_AUTOSKIPDRAW, "40000000", "Remove blur effect on some games\nSlow games.");
164
165 for (map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
166 {
167 gtk_list_store_append(treestore, &treeiter);//new row
168 itval = (hacks._u32 & it->second.value) ? true : false;
169
170 if (conf.def_hacks._u32 & it->second.value)
171 {
172 snprintf(descbuf, 254, "*%s", it->second.desc);
173 }
174 else
175 {
176 snprintf(descbuf, 254, "%s", it->second.desc);
177 }
178
179 gtk_list_store_set(treestore, &treeiter, 0, itval, 1, descbuf, -1);
180 }
181
182 gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(treestore));//NB: store is cast as tree model.
183
184 g_object_unref(treestore);//allow model to be destroyed when the tree is destroyed.
185
186 //don't select/highlight rows
187 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), GTK_SELECTION_NONE);
188 //------treeview done -------//
189 }
190
191 void SaveGameHackTable(GtkWidget *treeview, gameHacks& hacks)
192 {
193 GtkTreeModel *treemodel;
194 GtkTreeIter treeiter;
195 gboolean treeoptval;
196
197 //------- get advanced options from the treeview model -------//
198 treemodel = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview));
199 gtk_tree_model_get_iter_first(treemodel, &treeiter);
200
201 hacks._u32 = 0;
202
203 for (map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
204 {
205 treeoptval = false;
206 gtk_tree_model_get(treemodel, &treeiter, 0, &treeoptval, -1);
207
208 if (treeoptval) hacks._u32 |= it->second.value;
209
210 gtk_tree_model_iter_next(treemodel, &treeiter);
211 }
212
213 //---------- done getting advanced options ---------//
214 }
215
216 void OnToggle_advopts(GtkCellRendererToggle *cell, gchar *path, gpointer user_data)
217 {
218 GtkTreeIter treeiter;
219 gboolean val;
220
221 gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(user_data), &treeiter, path);
222 gtk_tree_model_get(GTK_TREE_MODEL(user_data), &treeiter, 0, &val, -1);
223 val = !val;
224 gtk_list_store_set(GTK_LIST_STORE(user_data), &treeiter, 0, val, -1);
225 }
226
227 void DisplayAdvancedDialog()
228 {
229 GtkWidget *dialog;
230
231 GtkWidget *advanced_frame, *advanced_box;
232 GtkWidget *advanced_scroll;
233 GtkWidget *tree;
234
235 dialog = gtk_dialog_new();
236 gtk_window_set_title(GTK_WINDOW(dialog), "ZZOgl PG Advanced Config");
237 // A good value for the heigh will be 1000 instead of 800 but I'm afraid that some people still uses small screen...
238 gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 800);
239 gtk_window_set_modal(GTK_WINDOW(dialog), true);
240
241 advanced_box = gtk_vbox_new(false, 5);
242 advanced_frame = gtk_frame_new("Advanced Settings:");
243 gtk_container_add(GTK_CONTAINER(advanced_frame), advanced_box);
244
245 tree = gtk_tree_view_new();
246
247 CreateGameHackTable(tree, tempHacks);
248
249 advanced_scroll = gtk_scrolled_window_new(NULL, NULL);
250
251 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(advanced_scroll), tree);
252
253 gtk_box_pack_start(GTK_BOX(advanced_box), advanced_scroll, true, true, 2);
254
255 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), advanced_frame);
256
257 gtk_widget_show_all(dialog);
258
259 gtk_dialog_run(GTK_DIALOG(dialog));
260 SaveGameHackTable(tree, tempHacks);
261 gtk_widget_destroy(dialog);
262 }
263
264 void DisplayDialog()
265 {
266 int return_value;
267
268 GtkWidget *dialog;
269 GtkWidget *main_frame, *main_box;
270
271 GtkWidget *option_frame, *option_box;
272 GtkWidget *log_check, *dis_hacks_check;
273 GtkWidget *int_label, *int_box, *int_holder;
274 GtkWidget *bilinear_label, *bilinear_box, *bilinear_holder;
275 GtkWidget *aa_label, *aa_box, *aa_holder;
276 GtkWidget *snap_label, *snap_box, *snap_holder;
277 GtkWidget *fullscreen_label, *widescreen_check;
278
279
280 GtkWidget *advanced_button;
281 GtkWidget *separator;
282 GtkWidget *skipdraw_label, *skipdraw_text, *skipdraw_holder, *warning_label;
283
284 if (!(conf.loaded())) LoadConfig();
285
286 /* Create the widgets */
287 dialog = gtk_dialog_new_with_buttons(
288 "ZZOgl PG Config",
289 NULL, /* parent window*/
290 (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT),
291 GTK_STOCK_CANCEL,
292 GTK_RESPONSE_REJECT,
293 GTK_STOCK_OK,
294 GTK_RESPONSE_ACCEPT,
295 NULL);
296
297 log_check = gtk_check_button_new_with_label("Logging");
298 gtk_widget_set_tooltip_text(log_check, "Used for Debugging.");
299
300 int_label = gtk_label_new("Interlacing:");
301 int_box = gtk_combo_box_new_text();
302
303 gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "No Interlacing");
304 gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "Interlace 0");
305 gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "Interlace 1");
306 gtk_combo_box_set_active(GTK_COMBO_BOX(int_box), conf.interlace);
307 gtk_widget_set_tooltip_text(int_box, "Toggled by pressing F5 when running.");
308 int_holder = gtk_hbox_new(false, 5);
309 gtk_box_pack_start(GTK_BOX(int_holder), int_label, false, false, 2);
310 gtk_box_pack_start(GTK_BOX(int_holder), int_box, false, false, 2);
311
312 bilinear_label = gtk_label_new("Bilinear Filtering:");
313 bilinear_box = gtk_combo_box_new_text();
314
315 gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Off");
316 gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Normal");
317 gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Forced");
318 gtk_combo_box_set_active(GTK_COMBO_BOX(bilinear_box), conf.bilinear);
319 gtk_widget_set_tooltip_text(bilinear_box, "Best quality is off. Turn on for speed. Toggled by pressing Shift + F5 when running.");
320 bilinear_holder = gtk_hbox_new(false, 5);
321 gtk_box_pack_start(GTK_BOX(bilinear_holder), bilinear_label, false, false, 2);
322 gtk_box_pack_start(GTK_BOX(bilinear_holder), bilinear_box, false, false, 2);
323
324 aa_label = gtk_label_new("Anti-Aliasing:");
325 aa_box = gtk_combo_box_new_text();
326
327 gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "1X (None)");
328 gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "2X");
329 gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "4X");
330 gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "8X");
331 gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "16X");
332 gtk_combo_box_set_active(GTK_COMBO_BOX(aa_box), conf.aa);
333 gtk_widget_set_tooltip_text(aa_box, "Toggled by pressing F6 when running.");
334 aa_holder = gtk_hbox_new(false, 5);
335 gtk_box_pack_start(GTK_BOX(aa_holder), aa_label, false, false, 2);
336 gtk_box_pack_start(GTK_BOX(aa_holder), aa_box, false, false, 2);
337
338 snap_label = gtk_label_new("Snapshot format:");
339 snap_box = gtk_combo_box_new_text();
340 gtk_combo_box_append_text(GTK_COMBO_BOX(snap_box), "JPEG");
341 gtk_combo_box_append_text(GTK_COMBO_BOX(snap_box), "TIFF");
342 gtk_combo_box_set_active(GTK_COMBO_BOX(snap_box), conf.zz_options.tga_snap);
343 snap_holder = gtk_hbox_new(false, 5);
344 gtk_box_pack_start(GTK_BOX(snap_holder), snap_label, false, false, 2);
345 gtk_box_pack_start(GTK_BOX(snap_holder), snap_box, false, false, 2);
346
347 widescreen_check = gtk_check_button_new_with_label("Widescreen");
348 gtk_widget_set_tooltip_text(widescreen_check, "Force a 4:3 ration when disabled");
349 fullscreen_label = gtk_label_new("Press Alt-Enter for Fullscreen.");
350 gtk_label_set_single_line_mode(GTK_LABEL(fullscreen_label), false);
351
352 advanced_button = gtk_button_new_with_label("Advanced...");
353
354 dis_hacks_check = gtk_check_button_new_with_label("Disable Automatic Hacks");
355 gtk_widget_set_tooltip_text(dis_hacks_check, "Used for testing how useful hacks that are on automatically are.");
356
357 #ifdef ZEROGS_DEVBUILD
358 separator = gtk_hseparator_new();
359 skipdraw_label = gtk_label_new("Skipdraw:");
360 skipdraw_text = gtk_entry_new();
361 warning_label = gtk_label_new("Experimental!!");
362 char buf[5];
363 sprintf(buf, "%d", conf.SkipDraw);
364 gtk_entry_set_text(GTK_ENTRY(skipdraw_text), buf);
365 skipdraw_holder = gtk_hbox_new(false, 5);
366
367 gtk_box_pack_start(GTK_BOX(skipdraw_holder), skipdraw_label, false, false, 2);
368 gtk_box_pack_start(GTK_BOX(skipdraw_holder), skipdraw_text, false, false, 2);
369 #endif
370
371 main_box = gtk_hbox_new(false, 5);
372 main_frame = gtk_frame_new("ZZOgl PG Config");
373
374 gtk_container_add(GTK_CONTAINER(main_frame), main_box);
375
376 option_box = gtk_vbox_new(false, 5);
377 option_frame = gtk_frame_new("");
378 gtk_container_add(GTK_CONTAINER(option_frame), option_box);
379 gtk_frame_set_shadow_type(GTK_FRAME(option_frame), GTK_SHADOW_NONE);
380
381 gtk_box_pack_start(GTK_BOX(option_box), log_check, false, false, 2);
382 gtk_box_pack_start(GTK_BOX(option_box), bilinear_holder, false, false, 2);
383 gtk_box_pack_start(GTK_BOX(option_box), int_holder, false, false, 2);
384 gtk_box_pack_start(GTK_BOX(option_box), aa_holder, false, false, 2);
385 gtk_box_pack_start(GTK_BOX(option_box), snap_holder, false, false, 2);
386 gtk_box_pack_start(GTK_BOX(option_box), widescreen_check, false, false, 2);
387 gtk_box_pack_start(GTK_BOX(option_box), advanced_button, false, false, 2);
388 gtk_box_pack_start(GTK_BOX(option_box), dis_hacks_check, false, false, 2);
389
390 #ifdef ZEROGS_DEVBUILD
391 gtk_box_pack_start(GTK_BOX(option_box), separator, false, false, 2);
392 gtk_box_pack_start(GTK_BOX(option_box), warning_label, false, false, 2);
393 gtk_box_pack_start(GTK_BOX(option_box), skipdraw_holder, false, false, 2);
394 #endif
395
396 gtk_box_pack_start(GTK_BOX(option_box), fullscreen_label, false, false, 2);
397
398 gtk_box_pack_start(GTK_BOX(main_box), option_frame, false, false, 2);
399
400 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(log_check), conf.log);
401 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widescreen_check), (conf.widescreen()));
402 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dis_hacks_check), (conf.disableHacks));
403
404 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), main_frame);
405 g_signal_connect_swapped(GTK_OBJECT (advanced_button), "clicked", G_CALLBACK(DisplayAdvancedDialog), advanced_button);
406 tempHacks = conf.hacks;
407 gtk_widget_show_all(dialog);
408
409 return_value = gtk_dialog_run(GTK_DIALOG(dialog));
410
411 if (return_value == GTK_RESPONSE_ACCEPT)
412 {
413 ZZOptions fake_options;
414
415 if (gtk_combo_box_get_active(GTK_COMBO_BOX(int_box)) != -1)
416 conf.interlace = gtk_combo_box_get_active(GTK_COMBO_BOX(int_box));
417
418 if (gtk_combo_box_get_active(GTK_COMBO_BOX(aa_box)) != -1)
419 conf.aa = gtk_combo_box_get_active(GTK_COMBO_BOX(aa_box));
420
421 if (gtk_combo_box_get_active(GTK_COMBO_BOX(bilinear_box)) != -1)
422 conf.bilinear = gtk_combo_box_get_active(GTK_COMBO_BOX(bilinear_box));
423
424 conf.log = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(log_check));
425 fake_options.widescreen = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widescreen_check));
426 fake_options.tga_snap = gtk_combo_box_get_active(GTK_COMBO_BOX(snap_box));
427
428 #ifdef ZEROGS_DEVBUILD
429 conf.SkipDraw = atoi((char*)gtk_entry_get_text(GTK_ENTRY(skipdraw_text)));
430 #endif
431
432 conf.zz_options = fake_options;
433 conf.hacks = tempHacks;
434
435 conf.disableHacks = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dis_hacks_check));
436
437 GSsetGameCRC(g_LastCRC, conf.hacks._u32);
438
439 SaveConfig();
440 }
441
442 gtk_widget_destroy(dialog);
443 }
444
445 void CALLBACK GSconfigure()
446 {
447 char strcurdir[256];
448 getcwd(strcurdir, 256);
449
450 if (!(conf.loaded())) LoadConfig();
451
452 DisplayDialog();
453 }
454
455 void SysMessage(const char *fmt, ...)
456 {
457 va_list list;
458 char msg[512];
459
460 va_start(list, fmt);
461 vsprintf(msg, fmt, list);
462 va_end(list);
463
464 if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0;
465
466 GtkWidget *dialog;
467
468 dialog = gtk_message_dialog_new(NULL,
469 GTK_DIALOG_DESTROY_WITH_PARENT,
470 GTK_MESSAGE_INFO,
471 GTK_BUTTONS_OK,
472 "%s", msg);
473
474 gtk_dialog_run(GTK_DIALOG(dialog));
475
476 gtk_widget_destroy(dialog);
477 }
478
479 void CALLBACK GSabout()
480 {
481 SysMessage("ZZOgl PG: by Zeydlitz (PG version worked on by arcum42, gregory, and the pcsx2 development team). Based off of ZeroGS, by zerofrog.");
482 }
483
484 s32 CALLBACK GStest()
485 {
486 return 0;
487 }
488
489 void *SysLoadLibrary(char *lib)
490 {
491 return dlopen(lib, RTLD_NOW | RTLD_GLOBAL);
492 }
493
494 void *SysLoadSym(void *lib, char *sym)
495 {
496 void *ret = dlsym(lib, sym);
497
498 if (ret == NULL) ZZLog::Debug_Log("null: %s", sym);
499
500 return dlsym(lib, sym);
501 }
502
503 char *SysLibError()
504 {
505 return dlerror();
506 }
507
508 void SysCloseLibrary(void *lib)
509 {
510 dlclose(lib);
511 }

  ViewVC Help
Powered by ViewVC 1.1.22