mirror of https://github.com/PCSX2/pcsx2.git
ZeroGS: AA switching fix. Add preliminary code for 8x & 16x AA to the OpenGL version. See issue 148.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@706 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
504de36d80
commit
55c221ca8a
|
@ -548,7 +548,7 @@ void CALLBACK GSvsync(int interlace)
|
|||
|
||||
if( (GetKeyState(VK_SHIFT)&0x8000) ) {
|
||||
conf.aa--; // -1
|
||||
if( conf.aa < 0 ) conf.aa = 4;
|
||||
if( conf.aa > 4) conf.aa = 4;
|
||||
sprintf(strtitle, "anti-aliasing - %s", s_aa[conf.aa]);
|
||||
ZeroGS::SetAA(conf.aa);
|
||||
}
|
||||
|
@ -1016,17 +1016,22 @@ int CALLBACK GSsetupRecording(int start, void* pData)
|
|||
return 1;
|
||||
}
|
||||
|
||||
s32 CALLBACK GSfreeze(int mode, freezeData *data) {
|
||||
if (mode == FREEZE_LOAD) {
|
||||
if( !ZeroGS::Load(data->data) )
|
||||
DEBUG_LOG("GS: Bad load format!");
|
||||
g_nRealFrame += 100;
|
||||
|
||||
} else if (mode == FREEZE_SAVE) {
|
||||
ZeroGS::Save(data->data);
|
||||
}
|
||||
if (mode == FREEZE_SIZE) {
|
||||
data->size = ZeroGS::Save(NULL);
|
||||
s32 CALLBACK GSfreeze(int mode, freezeData *data)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case FREEZE_LOAD:
|
||||
if (!ZeroGS::Load(data->data)) DEBUG_LOG("GS: Bad load format!");
|
||||
g_nRealFrame += 100;
|
||||
break;
|
||||
case FREEZE_SAVE:
|
||||
ZeroGS::Save(data->data);
|
||||
break;
|
||||
case FREEZE_SIZE:
|
||||
data->size = ZeroGS::Save(NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1217,6 +1217,8 @@ void ZeroGS::ChangeDeviceSize(int nNewWidth, int nNewHeight)
|
|||
|
||||
void ZeroGS::SetAA(int mode)
|
||||
{
|
||||
float f;
|
||||
|
||||
// need to flush all targets
|
||||
s_RTs.ResolveAll();
|
||||
s_RTs.Destroy();
|
||||
|
@ -1224,7 +1226,8 @@ void ZeroGS::SetAA(int mode)
|
|||
s_DepthRTs.Destroy();
|
||||
|
||||
s_AAx = s_AAy = 0;
|
||||
if( mode > 0 ) {
|
||||
if( mode > 0 )
|
||||
{
|
||||
s_AAx = (mode+1) / 2;
|
||||
s_AAy = mode / 2;
|
||||
}
|
||||
|
@ -1233,7 +1236,8 @@ void ZeroGS::SetAA(int mode)
|
|||
|
||||
vb[0].prndr = NULL; vb[0].pdepth = NULL; vb[0].bNeedFrameCheck = 1; vb[0].bNeedZCheck = 1;
|
||||
vb[1].prndr = NULL; vb[1].pdepth = NULL; vb[1].bNeedFrameCheck = 1; vb[1].bNeedZCheck = 1;
|
||||
float f = mode > 0 ? 2.0f : 1.0f;
|
||||
|
||||
f = mode > 0 ? 2.0f : 1.0f;
|
||||
SETRS(D3DRS_POINTSIZE, FtoDW(f));
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ char *libraryName = "ZeroGS Playground OpenGL ";
|
|||
char *libraryName = "ZeroGS-Pg OpenGL (Dev) ";
|
||||
#endif
|
||||
|
||||
static const char* s_aa[3] = { "AA none |", "AA 2x |", "AA 4x |" };
|
||||
static const char* s_aa[5] = { "AA none |", "AA 2x |", "AA 4x |", "AA 8x |", "AA 16x |" };
|
||||
static const char* pbilinear[] = { "off", "normal", "forced" };
|
||||
|
||||
extern GIFRegHandler g_GIFPackedRegHandlers[];
|
||||
|
@ -329,7 +329,7 @@ void OnKeyboardF6(int shift)
|
|||
char strtitle[256];
|
||||
if( shift ) {
|
||||
conf.aa--; // -1
|
||||
if( conf.aa < 0 ) conf.aa = 4;
|
||||
if( conf.aa > 4 ) conf.aa = 4; // u8 in unsigned, so negative value is 255.
|
||||
sprintf(strtitle, "anti-aliasing - %s", s_aa[conf.aa]);
|
||||
ZeroGS::SetAA(conf.aa);
|
||||
}
|
||||
|
@ -1155,19 +1155,24 @@ int CALLBACK GSsetupRecording(int start, void* pData)
|
|||
return 1;
|
||||
}
|
||||
|
||||
s32 CALLBACK GSfreeze(int mode, freezeData *data) {
|
||||
if (mode == FREEZE_LOAD) {
|
||||
if( !ZeroGS::Load(data->data) )
|
||||
ERROR_LOG("Bad load format!");
|
||||
g_nRealFrame += 100;
|
||||
|
||||
} else if (mode == FREEZE_SAVE) {
|
||||
ZeroGS::Save(data->data);
|
||||
s32 CALLBACK GSfreeze(int mode, freezeData *data)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case FREEZE_LOAD:
|
||||
if (!ZeroGS::Load(data->data)) ERROR_LOG("GS: Bad load format!");
|
||||
g_nRealFrame += 100;
|
||||
break;
|
||||
case FREEZE_SAVE:
|
||||
ZeroGS::Save(data->data);
|
||||
break;
|
||||
case FREEZE_SIZE:
|
||||
data->size = ZeroGS::Save(NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (mode == FREEZE_SIZE) {
|
||||
data->size = ZeroGS::Save(NULL);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,25 +26,30 @@
|
|||
|
||||
extern string s_strIniPath;
|
||||
|
||||
void SaveConfig() {
|
||||
void SaveConfig()
|
||||
{
|
||||
FILE *f;
|
||||
char cfg[255];
|
||||
|
||||
strcpy(cfg, s_strIniPath.c_str());
|
||||
f = fopen(cfg,"w");
|
||||
if (f == NULL) {
|
||||
if (f == NULL)
|
||||
{
|
||||
printf("failed to open %s\n", s_strIniPath.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(f, "interlace = %x\n", conf.interlace);
|
||||
fprintf(f, "aliasing = %x\n", conf.aa);
|
||||
fprintf(f, "bilinear = %x\n", conf.bilinear);
|
||||
fprintf(f, "mrtdepth = %x\n", conf.mrtdepth);
|
||||
fprintf(f, "options = %x\n", conf.options);
|
||||
fprintf(f, "bilinear = %x\n", conf.bilinear);
|
||||
fprintf(f, "aliasing = %x\n", conf.aa);
|
||||
fprintf(f, "gamesettings = %x\n", conf.gamesettings);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
void LoadConfig() {
|
||||
void LoadConfig()
|
||||
{
|
||||
FILE *f;
|
||||
char cfg[255];
|
||||
|
||||
|
@ -55,25 +60,29 @@ void LoadConfig() {
|
|||
conf.bilinear = 1;
|
||||
conf.width = 640;
|
||||
conf.height = 480;
|
||||
conf.aa = 0;
|
||||
|
||||
strcpy(cfg, s_strIniPath.c_str());
|
||||
f = fopen(cfg, "r");
|
||||
if (f == NULL) {
|
||||
if (f == NULL)
|
||||
{
|
||||
printf("failed to open %s\n", s_strIniPath.c_str());
|
||||
SaveConfig();//save and return
|
||||
return;
|
||||
}
|
||||
fscanf(f, "interlace = %x\n", &conf.interlace);
|
||||
fscanf(f, "aliasing = %x\n", &conf.aa);
|
||||
fscanf(f, "bilinear = %x\n", &conf.bilinear);
|
||||
fscanf(f, "mrtdepth = %x\n", &conf.mrtdepth);
|
||||
fscanf(f, "options = %x\n", &conf.options);
|
||||
fscanf(f, "bilinear = %x\n", &conf.bilinear);
|
||||
fscanf(f, "aliasing = %x\n", &conf.aa);
|
||||
fscanf(f, "gamesettings = %x\n", &conf.gamesettings);
|
||||
fclose(f);
|
||||
|
||||
// filter bad files
|
||||
if( conf.aa < 0 || conf.aa > 2 ) conf.aa = 0;
|
||||
if ((conf.aa < 0) || (conf.aa > 4)) conf.aa = 0;
|
||||
|
||||
switch(conf.options&GSOPTION_WINDIMS) {
|
||||
switch(conf.options & GSOPTION_WINDIMS)
|
||||
{
|
||||
case GSOPTION_WIN640:
|
||||
conf.width = 640;
|
||||
conf.height = 480;
|
||||
|
@ -92,11 +101,12 @@ void LoadConfig() {
|
|||
break;
|
||||
}
|
||||
|
||||
// turn off all hacks by defaultof
|
||||
conf.options &= ~(GSOPTION_FULLSCREEN|GSOPTION_WIREFRAME|GSOPTION_CAPTUREAVI);
|
||||
// turn off all hacks by default
|
||||
conf.options &= ~(GSOPTION_FULLSCREEN | GSOPTION_WIREFRAME | GSOPTION_CAPTUREAVI);
|
||||
conf.options |= GSOPTION_LOADED;
|
||||
|
||||
if( conf.width <= 0 || conf.height <= 0 ) {
|
||||
if( conf.width <= 0 || conf.height <= 0 )
|
||||
{
|
||||
conf.width = 640;
|
||||
conf.height = 480;
|
||||
}
|
||||
|
|
|
@ -36,10 +36,12 @@ extern "C" {
|
|||
|
||||
static int prevbilinearfilter;
|
||||
//static map<string, int> mapConfOpts;
|
||||
struct confOptsStruct{
|
||||
struct confOptsStruct
|
||||
{
|
||||
int value;
|
||||
const char *desc;
|
||||
}confOpts;
|
||||
|
||||
static map<string, confOptsStruct> mapConfOpts;
|
||||
|
||||
extern void OnKeyboardF5(int);
|
||||
|
@ -47,6 +49,8 @@ extern void OnKeyboardF6(int);
|
|||
extern void OnKeyboardF7(int);
|
||||
extern void OnKeyboardF9(int);
|
||||
|
||||
GtkWidget *About;
|
||||
|
||||
void CALLBACK GSkeyEvent(keyEvent *ev)
|
||||
{
|
||||
//static bool bShift = false;
|
||||
|
@ -97,7 +101,7 @@ GList *cachesizel;
|
|||
GList *codecl;
|
||||
GList *filtersl;
|
||||
|
||||
void OnConf_Ok(GtkButton *button, gpointer user_data)
|
||||
void OnConf_Ok(GtkButton *button, gpointer user_data)
|
||||
{
|
||||
GtkWidget *Btn;
|
||||
GtkWidget *treeview;
|
||||
|
@ -108,31 +112,36 @@ void OnConf_Ok(GtkButton *button, gpointer user_data)
|
|||
char *str;
|
||||
int i;
|
||||
|
||||
u32 newinterlace = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkInterlace")));
|
||||
u32 newinterlace = is_checked(Conf, "checkInterlace");
|
||||
|
||||
if( !conf.interlace ) conf.interlace = newinterlace;
|
||||
else if( !newinterlace ) conf.interlace = 2; // off
|
||||
if (!conf.interlace )
|
||||
conf.interlace = newinterlace;
|
||||
else if (!newinterlace )
|
||||
conf.interlace = 2; // off
|
||||
|
||||
conf.bilinear = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkBilinear")));
|
||||
// restore
|
||||
if( conf.bilinear && prevbilinearfilter )
|
||||
if (conf.bilinear && prevbilinearfilter)
|
||||
conf.bilinear = prevbilinearfilter;
|
||||
|
||||
//conf.mrtdepth = 1;//IsDlgButtonChecked(hW, IDC_CONFIG_DEPTHWRITE);
|
||||
|
||||
if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioAANone"))) ) {
|
||||
if is_checked(Conf, "radioAANone")
|
||||
conf.aa = 0;
|
||||
}
|
||||
else if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioAA2X"))) ) {
|
||||
else if is_checked(Conf, "radioAA2X")
|
||||
conf.aa = 1;
|
||||
}
|
||||
else conf.aa = 2;
|
||||
else if is_checked(Conf, "radioAA4X")
|
||||
conf.aa = 2;
|
||||
else if is_checked(Conf, "radioAA8X")
|
||||
conf.aa = 3;
|
||||
else
|
||||
conf.aa = 4;
|
||||
|
||||
conf.options = 0;
|
||||
conf.options |= gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkAVI"))) ? GSOPTION_CAPTUREAVI : 0;
|
||||
conf.options |= gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkWireframe"))) ? GSOPTION_WIREFRAME : 0;
|
||||
conf.options |= gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkbutton6"))) ? GSOPTION_FULLSCREEN : 0;
|
||||
conf.options |= gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkTGA"))) ? GSOPTION_TGASNAP : 0;
|
||||
conf.options |= is_checked(Conf, "checkAVI") ? GSOPTION_CAPTUREAVI : 0;
|
||||
conf.options |= is_checked(Conf, "checkWireframe") ? GSOPTION_WIREFRAME : 0;
|
||||
conf.options |= is_checked(Conf, "checkfullscreen") ? GSOPTION_FULLSCREEN : 0;
|
||||
conf.options |= is_checked(Conf, "checkTGA") ? GSOPTION_TGASNAP : 0;
|
||||
|
||||
//------- get advanced options from the treeview model -------//
|
||||
treeview = lookup_widget(Conf,"treeview1");
|
||||
|
@ -140,26 +149,26 @@ void OnConf_Ok(GtkButton *button, gpointer user_data)
|
|||
gtk_tree_model_get_iter_first(treemodel, &treeiter);
|
||||
|
||||
conf.gamesettings = 0;
|
||||
for(map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it) {
|
||||
for(map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
||||
{
|
||||
treeoptval = FALSE;
|
||||
gtk_tree_model_get(treemodel, &treeiter,
|
||||
0, &treeoptval,
|
||||
-1);
|
||||
if(treeoptval){
|
||||
conf.gamesettings |= it->second.value;
|
||||
}
|
||||
gtk_tree_model_get(treemodel, &treeiter, 0, &treeoptval, -1);
|
||||
|
||||
if(treeoptval) conf.gamesettings |= it->second.value;
|
||||
|
||||
gtk_tree_model_iter_next(treemodel,&treeiter);
|
||||
}
|
||||
|
||||
GSsetGameCRC(0, conf.gamesettings);
|
||||
//---------- done getting advanced options ---------//
|
||||
|
||||
if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize640"))) )
|
||||
if is_checked(Conf, "radioSize640")
|
||||
conf.options |= GSOPTION_WIN640;
|
||||
else if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize800"))) )
|
||||
else if is_checked(Conf, "radioSize800")
|
||||
conf.options |= GSOPTION_WIN800;
|
||||
else if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize1024"))) )
|
||||
else if is_checked(Conf, "radioSize1024")
|
||||
conf.options |= GSOPTION_WIN1024;
|
||||
else if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize1280"))) )
|
||||
else if is_checked(Conf, "radioSize1280")
|
||||
conf.options |= GSOPTION_WIN1280;
|
||||
|
||||
SaveConfig();
|
||||
|
@ -168,7 +177,8 @@ void OnConf_Ok(GtkButton *button, gpointer user_data)
|
|||
gtk_main_quit();
|
||||
}
|
||||
|
||||
void OnConf_Cancel(GtkButton *button, gpointer user_data) {
|
||||
void OnConf_Cancel(GtkButton *button, gpointer user_data)
|
||||
{
|
||||
gtk_widget_destroy(Conf);
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
@ -185,25 +195,25 @@ void CALLBACK GSconfigure()
|
|||
GtkTreeIter treeiter;
|
||||
GtkTreeViewColumn *treecol;
|
||||
|
||||
if( !(conf.options & GSOPTION_LOADED) )
|
||||
LoadConfig();
|
||||
|
||||
if (!(conf.options & GSOPTION_LOADED)) LoadConfig();
|
||||
Conf = create_Config();
|
||||
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkBilinear")), !!conf.bilinear);
|
||||
//gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkbutton6")), conf.mrtdepth);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioAANone")), conf.aa==0);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioAA2X")), conf.aa==1);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioAA4X")), conf.aa==2);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkWireframe")), (conf.options&GSOPTION_WIREFRAME)?1:0);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkAVI")), (conf.options&GSOPTION_CAPTUREAVI)?1:0);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkbutton6")), (conf.options&GSOPTION_FULLSCREEN)?1:0);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "checkTGA")), (conf.options&GSOPTION_TGASNAP)?1:0);
|
||||
set_checked(Conf, "checkBilinear", !!conf.bilinear);
|
||||
//set_checked(Conf, "checkbutton6", conf.mrtdepth);
|
||||
set_checked(Conf, "radioAANone", conf.aa==0);
|
||||
set_checked(Conf, "radioAA2X", conf.aa==1);
|
||||
set_checked(Conf, "radioAA4X", conf.aa==2);
|
||||
set_checked(Conf, "radioAA8X", conf.aa==3);
|
||||
set_checked(Conf, "radioAA16X", conf.aa==4);
|
||||
set_checked(Conf, "checkWireframe", (conf.options&GSOPTION_WIREFRAME)?1:0);
|
||||
set_checked(Conf, "checkAVI", (conf.options&GSOPTION_CAPTUREAVI)?1:0);
|
||||
set_checked(Conf, "checkfullscreen", (conf.options&GSOPTION_FULLSCREEN)?1:0);
|
||||
set_checked(Conf, "checkTGA", (conf.options&GSOPTION_TGASNAP)?1:0);
|
||||
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize640")), ((conf.options&GSOPTION_WINDIMS)>>4)==0);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize800")), ((conf.options&GSOPTION_WINDIMS)>>4)==1);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize1024")), ((conf.options&GSOPTION_WINDIMS)>>4)==2);
|
||||
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(Conf, "radioSize1280")), ((conf.options&GSOPTION_WINDIMS)>>4)==3);
|
||||
set_checked(Conf, "radioSize640", ((conf.options&GSOPTION_WINDIMS)>>4)==0);
|
||||
set_checked(Conf, "radioSize800", ((conf.options&GSOPTION_WINDIMS)>>4)==1);
|
||||
set_checked(Conf, "radioSize1024", ((conf.options&GSOPTION_WINDIMS)>>4)==2);
|
||||
set_checked(Conf, "radioSize1280", ((conf.options&GSOPTION_WINDIMS)>>4)==3);
|
||||
|
||||
prevbilinearfilter = conf.bilinear;
|
||||
|
||||
|
@ -296,14 +306,12 @@ void CALLBACK GSconfigure()
|
|||
confOpts.desc = "32 bit render targets - 00200000";
|
||||
mapConfOpts["00200000"] = confOpts;
|
||||
|
||||
for(map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it) {
|
||||
for(map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
||||
{
|
||||
gtk_list_store_append(treestore, &treeiter);//new row
|
||||
itval = (conf.gamesettings&it->second.value)?TRUE:FALSE;
|
||||
snprintf(descbuf, 254, "%s", it->second.desc);
|
||||
gtk_list_store_set(treestore, &treeiter,
|
||||
0, itval,
|
||||
1, descbuf,
|
||||
-1);
|
||||
gtk_list_store_set(treestore, &treeiter, 0, itval, 1, descbuf, -1);
|
||||
}
|
||||
|
||||
gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(treestore));//NB: store is cast as tree model.
|
||||
|
@ -318,50 +326,47 @@ void CALLBACK GSconfigure()
|
|||
gtk_main();
|
||||
}
|
||||
|
||||
void OnToggle_advopts(GtkCellRendererToggle *cell, gchar *path, gpointer user_data){
|
||||
void OnToggle_advopts(GtkCellRendererToggle *cell, gchar *path, gpointer user_data)
|
||||
{
|
||||
GtkTreeIter treeiter;
|
||||
gboolean val;
|
||||
|
||||
gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(user_data), &treeiter, path);
|
||||
gtk_tree_model_get(GTK_TREE_MODEL(user_data), &treeiter,
|
||||
0, &val,
|
||||
-1);
|
||||
gtk_tree_model_get(GTK_TREE_MODEL(user_data), &treeiter, 0, &val, -1);
|
||||
val = !val;
|
||||
gtk_list_store_set(GTK_LIST_STORE(user_data), &treeiter,
|
||||
0, val,
|
||||
-1);
|
||||
gtk_list_store_set(GTK_LIST_STORE(user_data), &treeiter, 0, val, -1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
GtkWidget *About;
|
||||
|
||||
void OnAbout_Ok(GtkButton *button, gpointer user_data) {
|
||||
void OnAbout_Ok(GtkButton *button, gpointer user_data)
|
||||
{
|
||||
gtk_widget_destroy(About);
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
void CALLBACK GSabout() {
|
||||
|
||||
void CALLBACK GSabout()
|
||||
{
|
||||
About = create_About();
|
||||
|
||||
gtk_widget_show_all(About);
|
||||
gtk_main();
|
||||
}
|
||||
|
||||
s32 CALLBACK GStest() {
|
||||
s32 CALLBACK GStest()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
GtkWidget *MsgDlg;
|
||||
|
||||
void OnMsg_Ok() {
|
||||
void OnMsg_Ok()
|
||||
{
|
||||
gtk_widget_destroy(MsgDlg);
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
void SysMessage(char *fmt, ...) {
|
||||
void SysMessage(char *fmt, ...)
|
||||
{
|
||||
GtkWidget *Ok,*Txt;
|
||||
GtkWidget *Box,*Box1;
|
||||
va_list list;
|
||||
|
@ -402,20 +407,24 @@ void SysMessage(char *fmt, ...) {
|
|||
gtk_main();
|
||||
}
|
||||
|
||||
void *SysLoadLibrary(char *lib) {
|
||||
void *SysLoadLibrary(char *lib)
|
||||
{
|
||||
return dlopen(lib, RTLD_NOW | RTLD_GLOBAL);
|
||||
}
|
||||
|
||||
void *SysLoadSym(void *lib, char *sym) {
|
||||
void *SysLoadSym(void *lib, char *sym)
|
||||
{
|
||||
void *ret = dlsym(lib, sym);
|
||||
if (ret == NULL) printf("null: %s\n", sym);
|
||||
return dlsym(lib, sym);
|
||||
}
|
||||
|
||||
char *SysLibError() {
|
||||
char *SysLibError()
|
||||
{
|
||||
return dlerror();
|
||||
}
|
||||
|
||||
void SysCloseLibrary(void *lib) {
|
||||
void SysCloseLibrary(void *lib)
|
||||
{
|
||||
dlclose(lib);
|
||||
}
|
||||
|
|
|
@ -21,3 +21,6 @@
|
|||
#endif
|
||||
|
||||
void OnToggle_advopts(GtkCellRendererToggle *cell, gchar *path, gpointer user_data);
|
||||
|
||||
#define is_checked(main_widget, widget_name) (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name))))
|
||||
#define set_checked(main_widget,widget_name, state) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name)), state)
|
||||
|
|
|
@ -40,11 +40,13 @@ create_Config (void)
|
|||
GSList *radioAANone_group = NULL;
|
||||
GtkWidget *radioAA2X;
|
||||
GtkWidget *radioAA4X;
|
||||
GtkWidget *radioAA8X;
|
||||
GtkWidget *radioAA16X;
|
||||
GtkWidget *label9;
|
||||
GtkWidget *checkWireframe;
|
||||
GtkWidget *checkAVI;
|
||||
GtkWidget *checkTGA;
|
||||
GtkWidget *checkbutton6;
|
||||
GtkWidget *checkfullscreen;
|
||||
GtkWidget *frame5;
|
||||
GtkWidget *alignment2;
|
||||
GtkWidget *hbox7;
|
||||
|
@ -112,6 +114,18 @@ create_Config (void)
|
|||
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radioAA4X), radioAANone_group);
|
||||
radioAANone_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radioAA4X));
|
||||
|
||||
radioAA8X = gtk_radio_button_new_with_mnemonic (NULL, _("8X"));
|
||||
gtk_widget_show (radioAA8X);
|
||||
gtk_box_pack_start (GTK_BOX (hbox6), radioAA8X, FALSE, FALSE, 0);
|
||||
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radioAA8X), radioAANone_group);
|
||||
radioAANone_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radioAA8X));
|
||||
|
||||
radioAA16X = gtk_radio_button_new_with_mnemonic (NULL, _("16X"));
|
||||
gtk_widget_show (radioAA16X);
|
||||
gtk_box_pack_start (GTK_BOX (hbox6), radioAA16X, FALSE, FALSE, 0);
|
||||
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radioAA16X), radioAANone_group);
|
||||
radioAANone_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radioAA16X));
|
||||
|
||||
label9 = gtk_label_new (_("<b>Anti-aliasing for higher quality (F6)</b>"));
|
||||
gtk_widget_show (label9);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame4), label9);
|
||||
|
@ -129,9 +143,9 @@ create_Config (void)
|
|||
gtk_widget_show (checkTGA);
|
||||
gtk_box_pack_start (GTK_BOX (vbox4), checkTGA, FALSE, FALSE, 0);
|
||||
|
||||
checkbutton6 = gtk_check_button_new_with_mnemonic (_("Fullscreen (Alt+Enter)\n to get out press Alt+Enter again (or ESC)"));
|
||||
gtk_widget_show (checkbutton6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox4), checkbutton6, FALSE, FALSE, 0);
|
||||
checkfullscreen = gtk_check_button_new_with_mnemonic (_("Fullscreen (Alt+Enter)\n to get out press Alt+Enter again (or ESC)"));
|
||||
gtk_widget_show (checkfullscreen);
|
||||
gtk_box_pack_start (GTK_BOX (vbox4), checkfullscreen, FALSE, FALSE, 0);
|
||||
|
||||
frame5 = gtk_frame_new (NULL);
|
||||
gtk_widget_show (frame5);
|
||||
|
@ -238,11 +252,13 @@ create_Config (void)
|
|||
GLADE_HOOKUP_OBJECT (Config, radioAANone, "radioAANone");
|
||||
GLADE_HOOKUP_OBJECT (Config, radioAA2X, "radioAA2X");
|
||||
GLADE_HOOKUP_OBJECT (Config, radioAA4X, "radioAA4X");
|
||||
GLADE_HOOKUP_OBJECT (Config, radioAA8X, "radioAA8X");
|
||||
GLADE_HOOKUP_OBJECT (Config, radioAA16X, "radioAA16X");
|
||||
GLADE_HOOKUP_OBJECT (Config, label9, "label9");
|
||||
GLADE_HOOKUP_OBJECT (Config, checkWireframe, "checkWireframe");
|
||||
GLADE_HOOKUP_OBJECT (Config, checkAVI, "checkAVI");
|
||||
GLADE_HOOKUP_OBJECT (Config, checkTGA, "checkTGA");
|
||||
GLADE_HOOKUP_OBJECT (Config, checkbutton6, "checkbutton6");
|
||||
GLADE_HOOKUP_OBJECT (Config, checkfullscreen, "checkfullscreen");
|
||||
GLADE_HOOKUP_OBJECT (Config, frame5, "frame5");
|
||||
GLADE_HOOKUP_OBJECT (Config, alignment2, "alignment2");
|
||||
GLADE_HOOKUP_OBJECT (Config, hbox7, "hbox7");
|
||||
|
|
|
@ -149,6 +149,46 @@
|
|||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="radioAA8X">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">8X</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">radioAANone</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="radioAA16X">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">16X</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">radioAANone</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -242,7 +282,7 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="checkbutton6">
|
||||
<widget class="GtkCheckButton" id="checkfullscreen">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Fullscreen (Alt+Enter)
|
||||
|
|
|
@ -4418,7 +4418,7 @@ cat >>confdefs.h <<\_ACEOF
|
|||
_ACEOF
|
||||
|
||||
CFLAGS+="-O3 -fomit-frame-pointer "
|
||||
CPPFLAGS+="-O3 -fomit-frame-pointer -fpermissive "
|
||||
CPPFLAGS+="-O3 -fomit-frame-pointer "
|
||||
CXXFLAGS+="-O3 -fomit-frame-pointer -fpermissive "
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $debug" >&5
|
||||
|
|
|
@ -42,7 +42,7 @@ then
|
|||
else
|
||||
AC_DEFINE(NDEBUG,1,[NDEBUG])
|
||||
CFLAGS+="-O3 -fomit-frame-pointer "
|
||||
CPPFLAGS+="-O3 -fomit-frame-pointer -fpermissive "
|
||||
CPPFLAGS+="-O3 -fomit-frame-pointer "
|
||||
CXXFLAGS+="-O3 -fomit-frame-pointer -fpermissive "
|
||||
fi
|
||||
AC_MSG_RESULT($debug)
|
||||
|
|
|
@ -1680,6 +1680,7 @@ bool ZeroGS::Create(int _width, int _height)
|
|||
glDisable(GL_CULL_FACE);
|
||||
|
||||
// points
|
||||
// This was changed in SetAA - should we be changing it back?
|
||||
glPointSize(1.0f);
|
||||
g_nDepthBias = 0;
|
||||
glEnable(GL_POLYGON_OFFSET_FILL);
|
||||
|
@ -1928,20 +1929,28 @@ void ZeroGS::ChangeDeviceSize(int nNewWidth, int nNewHeight)
|
|||
|
||||
void ZeroGS::SetAA(int mode)
|
||||
{
|
||||
float f;
|
||||
|
||||
// need to flush all targets
|
||||
s_RTs.ResolveAll();
|
||||
s_RTs.Destroy();
|
||||
s_DepthRTs.ResolveAll();
|
||||
s_DepthRTs.Destroy();
|
||||
|
||||
s_AAx = s_AAy = 0; // This is code for x0, x2, x4, x8 and x16 anti-aliasing.
|
||||
if (mode > 0)
|
||||
{
|
||||
s_AAx = (mode+1) / 2; // ( 1, 0 ) ; ( 1, 1 ) ; ( 2, 1 ) ; ( 2, 2 ) -- it's used as binary shift, so x >> s_AAx, y >> s_AAy
|
||||
s_AAy = mode / 2;
|
||||
}
|
||||
|
||||
s_AAx = mode > 0;
|
||||
s_AAy = mode > 1;
|
||||
memset(s_nResolveCounts, 0, sizeof(s_nResolveCounts));
|
||||
s_nLastResolveReset = 0;
|
||||
|
||||
vb[0].prndr = NULL; vb[0].pdepth = NULL; vb[0].bNeedFrameCheck = 1; vb[0].bNeedZCheck = 1;
|
||||
vb[1].prndr = NULL; vb[1].pdepth = NULL; vb[1].bNeedFrameCheck = 1; vb[1].bNeedZCheck = 1;
|
||||
float f = mode > 0 ? 2.0f : 1.0f;
|
||||
|
||||
f = mode > 0 ? 2.0f : 1.0f;
|
||||
glPointSize(f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue