Update to v070 release.

byuu says:

This release represents the coup de grâce of bsnes/Qt.

Changelog:
- configuration file is now called bsnes-qt.cfg; the first run of this
  release will start with a clean state
- MSU1 now supports audio looping via new PCM file format
- disabled state load/save menu due to a serious bug in Qt 4.6.0 for
  Windows
- RawInput: all keyboards merged to KB0, it should no longer be required
  to reconfigure the keyboard out-of-the-box
- RawInput: fixed a bug where Xbox 360 controller states were being
  overwritten by DirectInput controllers
- RawInput: fixed a device sorting bug caused by moving ruby to Unicode
- Direct3D: fixed a pixel shader bug caused by moving ruby to Unicode
- Linux port: fixed sudo make install target
- Linux port: default to gcc/g++ instead of gcc-4.5/g++-4.5 for one last
  release
- updated to mightymo's 2010-09-20 cheat pack
This commit is contained in:
Tim Allen 2010-09-27 00:06:47 +10:00
parent ccfff86140
commit 449a3ad426
9 changed files with 1283 additions and 414 deletions

View File

@ -62,8 +62,8 @@ endif
install: install:
ifeq ($(platform),x) ifeq ($(platform),x)
install -D -m 755 out/bsnes $(DESTDIR)$(prefix)/bin/bsnes install -D -m 755 out/bsnes $(DESTDIR)$(prefix)/bin/bsnes
install -D -m 644 qt/data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png install -D -m 644 ui-qt/data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png
install -D -m 644 qt/data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop install -D -m 644 ui-qt/data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop
gconftool-2 --type bool --set /desktop/gnome/interface/menus_have_icons true gconftool-2 --type bool --set /desktop/gnome/interface/menus_have_icons true
endif endif

View File

@ -16,10 +16,10 @@ int main(int argc, char **argv) {
unused = realpath(nall::utf8_t(argw[0]), path); unused = realpath(nall::utf8_t(argw[0]), path);
#endif #endif
string realPath = dir(path); string realPath = dir(path);
string basePath = string(dir(path), "bsnes.cfg"); string basePath = string(dir(path), "bsnes-qt.cfg");
unused = userpath(path); unused = userpath(path);
if(!strend(path, "/") && !strend(path, "\\")) strcat(path, "/"); if(!strend(path, "/") && !strend(path, "\\")) strcat(path, "/");
string userPath = string(path, ".bsnes/bsnes.cfg"); string userPath = string(path, ".bsnes/bsnes-qt.cfg");
configuration config; configuration config;
string profile; string profile;

View File

@ -32,9 +32,9 @@ ifeq ($(compiler),)
ifeq ($(platform),win) ifeq ($(platform),win)
compiler := gcc compiler := gcc
else ifeq ($(platform),osx) else ifeq ($(platform),osx)
compiler := gcc-mp-4.5 compiler := gcc-mp-4.4
else else
compiler := gcc-4.5 compiler := gcc
endif endif
endif endif

View File

@ -277,8 +277,8 @@ public:
//this is used to sort device IDs //this is used to sort device IDs
struct DevicePool { struct DevicePool {
HANDLE handle; HANDLE handle;
char name[4096]; wchar_t name[4096];
bool operator<(const DevicePool &pool) const { return strcmp(name, pool.name) < 0; } bool operator<(const DevicePool &pool) const { return wcscmp(name, pool.name) < 0; }
}; };
int main() { int main() {
@ -342,8 +342,12 @@ public:
//per MSDN: XInput devices have "IG_" in their device strings, //per MSDN: XInput devices have "IG_" in their device strings,
//which is how they should be identified. //which is how they should be identified.
const char *p = strstr(pool[i].name, "IG_"); string p = utf8_t(pool[i].name);
lgamepad[n].isXInputDevice = (bool)p; if(auto position = strpos(p, "IG_")) {
lgamepad[n].isXInputDevice = true;
} else {
lgamepad[n].isXInputDevice = false;
}
} }
} }
} }
@ -693,7 +697,9 @@ public:
//========= //=========
for(unsigned i = 0; i < min(rawinput.lkeyboard.size(), (unsigned)Keyboard::Count); i++) { for(unsigned i = 0; i < min(rawinput.lkeyboard.size(), (unsigned)Keyboard::Count); i++) {
for(unsigned n = 0; n < nall::Keyboard::Size; n++) { for(unsigned n = 0; n < nall::Keyboard::Size; n++) {
table[keyboard(i).key(n)] = rawinput.lkeyboard[i].state[n]; //using keyboard(0)|= instead of keyboard(i)= merges all keyboards to KB0
//this is done to favor ease of mapping over flexibility (eg share laptop+USB keyboard mapping)
table[keyboard(0).key(n)] |= rawinput.lkeyboard[i].state[n];
} }
} }
@ -723,15 +729,17 @@ public:
for(unsigned i = 0; i < xinput.lgamepad.size(); i++) { for(unsigned i = 0; i < xinput.lgamepad.size(); i++) {
if(joy >= Joypad::Count) break; if(joy >= Joypad::Count) break;
table[joypad(i).hat(0)] = xinput.lgamepad[i].hat; table[joypad(joy).hat(0)] = xinput.lgamepad[i].hat;
for(unsigned axis = 0; axis < min(6U, (unsigned)Joypad::Axes); axis++) { for(unsigned axis = 0; axis < min(6U, (unsigned)Joypad::Axes); axis++) {
table[joypad(i).axis(axis)] = xinput.lgamepad[i].axis[axis]; table[joypad(joy).axis(axis)] = xinput.lgamepad[i].axis[axis];
} }
for(unsigned button = 0; button < min(10U, (unsigned)Joypad::Buttons); button++) { for(unsigned button = 0; button < min(10U, (unsigned)Joypad::Buttons); button++) {
table[joypad(i).button(button)] = xinput.lgamepad[i].button[button]; table[joypad(joy).button(button)] = xinput.lgamepad[i].button[button];
} }
joy++;
} }
//======================= //=======================
@ -742,16 +750,18 @@ public:
if(joy >= Joypad::Count) break; if(joy >= Joypad::Count) break;
for(unsigned hat = 0; hat < min(4U, (unsigned)Joypad::Hats); hat++) { for(unsigned hat = 0; hat < min(4U, (unsigned)Joypad::Hats); hat++) {
table[joypad(i).hat(hat)] = dinput.lgamepad[i].hat[hat]; table[joypad(joy).hat(hat)] = dinput.lgamepad[i].hat[hat];
} }
for(unsigned axis = 0; axis < min(6U, (unsigned)Joypad::Axes); axis++) { for(unsigned axis = 0; axis < min(6U, (unsigned)Joypad::Axes); axis++) {
table[joypad(i).axis(axis)] = dinput.lgamepad[i].axis[axis]; table[joypad(joy).axis(axis)] = dinput.lgamepad[i].axis[axis];
} }
for(unsigned button = 0; button < min(128U, (unsigned)Joypad::Buttons); button++) { for(unsigned button = 0; button < min(128U, (unsigned)Joypad::Buttons); button++) {
table[joypad(i).button(button)] = dinput.lgamepad[i].button[button]; table[joypad(joy).button(button)] = dinput.lgamepad[i].button[button];
} }
joy++;
} }
return true; return true;

View File

@ -349,14 +349,14 @@ public:
d3dx = LoadLibraryW(utf16_t(t)); d3dx = LoadLibraryW(utf16_t(t));
if(d3dx) break; if(d3dx) break;
} }
if(!d3dx) d3dx = LoadLibrary(L"d3dx9.dll"); if(!d3dx) d3dx = LoadLibraryW(L"d3dx9.dll");
if(!d3dx) return; if(!d3dx) return;
EffectProc effectProc = (EffectProc)GetProcAddress(d3dx, "D3DXCreateEffect"); EffectProc effectProc = (EffectProc)GetProcAddress(d3dx, "D3DXCreateEffect");
TextureProc textureProc = (TextureProc)GetProcAddress(d3dx, "D3DXCreateTextureFromFileA"); TextureProc textureProc = (TextureProc)GetProcAddress(d3dx, "D3DXCreateTextureFromFileA");
LPD3DXBUFFER pBufferErrors = NULL; LPD3DXBUFFER pBufferErrors = NULL;
effectProc(device, utf16_t(shaderSource), lstrlen(utf16_t(source)), NULL, NULL, 0, NULL, &effect, &pBufferErrors); effectProc(device, shaderSource, lstrlenA(source), NULL, NULL, 0, NULL, &effect, &pBufferErrors);
D3DXHANDLE hTech; D3DXHANDLE hTech;
effect->FindNextValidTechnique(NULL, &hTech); effect->FindNextValidTechnique(NULL, &hTech);

View File

@ -1,7 +1,7 @@
namespace SNES { namespace SNES {
namespace Info { namespace Info {
static const char Name[] = "bsnes"; static const char Name[] = "bsnes";
static const char Version[] = "069"; static const char Version[] = "070";
static const unsigned SerializerVersion = 13; static const unsigned SerializerVersion = 13;
} }
} }

View File

@ -71,7 +71,7 @@ int Application::main(int &argc, char **argv) {
#endif #endif
initPaths(argv[0]); initPaths(argv[0]);
locateFile(configFilename = "bsnes.cfg", true); locateFile(configFilename = "bsnes-qt.cfg", true);
locateFile(styleSheetFilename = "style.qss", false); locateFile(styleSheetFilename = "style.qss", false);
string customStylesheet; string customStylesheet;

View File

@ -151,6 +151,9 @@ MainWindow::MainWindow() {
tools_captureScreenshot = tools->addAction("&Capture Screenshot"); tools_captureScreenshot = tools->addAction("&Capture Screenshot");
#if 0
//this will crash on Qt 4.6.0/Windows, because QObject::sender() returns a non-QObject*, non-null pointer
//since we don't know what other Qt toolkits have this bug, it's safer to just disable the feature by default
tools->addSeparator(); tools->addSeparator();
tools_loadState = tools->addMenu("&Load Quick State"); tools_loadState = tools->addMenu("&Load Quick State");
@ -168,6 +171,7 @@ MainWindow::MainWindow() {
connect(saveAction, SIGNAL(triggered()), this, SLOT(saveState())); connect(saveAction, SIGNAL(triggered()), this, SLOT(saveState()));
tools_saveState->addAction(saveAction); tools_saveState->addAction(saveAction);
} }
#endif
tools->addSeparator(); tools->addSeparator();

File diff suppressed because it is too large Load Diff