OS X fiddling

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@89254 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
SND\MaddTheSane_cp 2014-03-03 19:50:59 +00:00
parent bc21097f43
commit 5660e3f373
6 changed files with 23 additions and 19 deletions

View File

@ -12,6 +12,7 @@
"OpenAL Sound" = "OpenAL hang";
"Mac OS X Sound" = "Mac OS X hang";
"P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "P.E.Op.S. Sound Driver V1.7\nFejlesztő Pete Bernert és a P.E.Op.S. team\n";
/*Unknown/not found value */
//"(Unknown)" = "(Unknown)";

View File

@ -16,19 +16,19 @@
//"(Unknown)" = "(Unknown)";
/* Interpolation Values */
"(No Interpolation)" = "(No Interpolation)";
//"(No Interpolation)" = "(No Interpolation)";
"(Simple Interpolation)" = "(简易增益)";
"(Gaussian Interpolation)" = "(Gaussian Interpolation)";
"(Cubic Interpolation)" = "(Cubic Interpolation)";
//"(Gaussian Interpolation)" = "(Gaussian Interpolation)";
//"(Cubic Interpolation)" = "(Cubic Interpolation)";
/* Reverb Values */
"(No Reverb)" = "(No Reverb)";
//"(No Reverb)" = "(No Reverb)";
"(Simple Reverb)" = "(简易混响)";
"(PSX Reverb)" = "(PSX Reverb)";
//"(PSX Reverb)" = "(PSX Reverb)";
/* Volume Values */
"(Muted)" = "(Muted)";
"(Low)" = "(Low)";
"(Medium)" = "(Medium)";
//"(Muted)" = "(Muted)";
//"(Low)" = "(Low)";
//"(Medium)" = "(Medium)";
"(Loud)" = "(高音)";
"(Loudest)" = "(Loudest)";
//"(Loudest)" = "(Loudest)";

View File

@ -156,10 +156,6 @@ static int mylog2(int val)
[NSOpenGLContext clearCurrentContext];
[glLock unlock];
if (image_base)
free(image_base);
}
- (void)reshapeGL2

View File

@ -117,7 +117,7 @@ static int mylog2(int val)
}
/* chargement du code source */
src = [self loadSource:filename];
src = [PluginGLView loadSource:filename];
if(src == NULL)
{
/* theoriquement, la fonction LoadSource a deja affiche un message

View File

@ -75,7 +75,7 @@ static inline void RunOnMainThreadSync(dispatch_block_t block)
- (void)swapBuffer;
- (void)clearBuffer:(BOOL)display;
- (void)loadTextures:(GLboolean)first;
- (char*)loadSource:(NSURL *)filename;
+ (char*)loadSource:(NSURL *)filename;
void printProgramInfoLog(GLuint obj);
@end

View File

@ -57,6 +57,10 @@ extern time_t tStart;
} else if (oglProfile == NSOpenGLProfileVersion3_2Core) {
[self cleanupGL3];
}
if (image_base) {
free(image_base);
}
}
- (BOOL)isOpaque
@ -174,16 +178,19 @@ extern time_t tStart;
}
}
- (char*)loadSource:(NSURL *)filename
+ (char*)loadSource:(NSURL *)filename
{
//Since we're passing Cocoa NSURLs, let's use Cocoa's methods
if (filename == nil) {
return NULL;
}
NSMutableData *shaderData = [NSMutableData dataWithContentsOfURL:filename];
NSUInteger len;
NSMutableData *shaderData = [[NSMutableData alloc] initWithContentsOfURL:filename];
[shaderData appendBytes:"\0" length:1];
char *shaderText = malloc([shaderData length]);
[shaderData getBytes:shaderText length:[shaderData length]];
len = [shaderData length];
char *shaderText = malloc(len);
[shaderData getBytes:shaderText length:len];
return shaderText;
}