Skip to content

Commit

Permalink
Merge branch 'master' into analog
Browse files Browse the repository at this point in the history
  • Loading branch information
LRFLEW committed Dec 30, 2021
2 parents 88d5b91 + 3ba3821 commit d3ae025
Show file tree
Hide file tree
Showing 192 changed files with 22,967 additions and 10,796 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
name: Build DeSmuME
name: Build DeSmuME (Linux)
runs-on: ubuntu-20.04

steps:
Expand All @@ -23,3 +23,28 @@ jobs:
- name: ninja
run: ninja -C desmume/src/frontend/posix/build

build_macos:
name: Build DeSmuME (macOS)
runs-on: macOS-11

steps:
- name: checkout
uses: actions/checkout@v2

- name: xcodebuild
run: |
cd desmume/src/frontend/cocoa/
xcodebuild archive -project "DeSmuME (Latest).xcodeproj" -scheme "DeSmuME (OS X App -- Latest Xcode)" -arch x86_64 -archivePath "$(pwd)/desmume.xcarchive" | xcpretty -c
- name: make zip
run: |
cd desmume/src/frontend/cocoa/desmume.xcarchive/Products/Applications/
7z a DeSmuME.app.zip DeSmuME.app
- name: Upload artifict
uses: actions/upload-artifact@v2
with:
name: macos
path: desmume/src/frontend/cocoa/desmume.xcarchive/Products/Applications/DeSmuME.app.zip
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ xcuserdata/
/.cproject
/config.log
/.project
.DS_Store
13 changes: 11 additions & 2 deletions desmume/README.LIN
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
DeSmuME

DeSmuME is written in C++ using the GTK+ and SDL libraries.
DeSmuME is written in C++ using the GTK+ and SDL2 libraries.

* https://gtk.org/
* https://libsdl.org/

It uses the Meson build system.
It uses the Meson build system to build the GTK+3 and SDL2 port:

* https://mesonbuild.com/

... and the autotools build system for the GTK+2 and SDL2 port.

to build GTK+2 or SDL2 frontend with autotools, cd to src/frontend/posix, then

autoreconf -i (or alternatively: ./autogen.sh)
./configure
make -jN (where N is the number of CPU cores to use).


DeSmuME provides another interface based on libglade, to use
, you'll need glade:

Expand Down
66 changes: 33 additions & 33 deletions desmume/src/Database.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2008-2016 DeSmuME team
Copyright (C) 2008-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -13,24 +13,24 @@
You should have received a copy of the GNU General Public License
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/

#include <string.h>

#include "types.h"
#include "Database.h"
#include "retro_miscellaneous.h"

//------------------------------------------------------------
//large databases are first. scroll down to ENDLARGE to find the code

struct MAKER
{
u16 code;
const char* name;
};


*/

#include <string.h>

#include "types.h"
#include "Database.h"
#include "retro_miscellaneous.h"

//------------------------------------------------------------
//large databases are first. scroll down to ENDLARGE to find the code

struct MAKER
{
u16 code;
const char* name;
};


static const char regions_index[] = "JPFSEODIRKHXVWUC";
static const char *regions[] = {
"JPN", // J
Expand All @@ -49,8 +49,8 @@ static const char *regions[] = {
"EUU", // W
"AUS", // U
"CHN", // C
};

};

static MAKER makerCodes[] = {
{ 0x3130, "Nintendo" },
{ 0x3230, "Rocket Games, Ajinomoto" },
Expand Down Expand Up @@ -367,26 +367,26 @@ static MAKER makerCodes[] = {
//ENDLARGE
//------------------------------------------------------------

namespace Database
{
const char* RegionXXXForCode(char code, bool unknownAsString)
{
namespace Database
{
const char* RegionXXXForCode(char code, bool unknownAsString)
{
size_t regions_num = ARRAY_SIZE(regions);

const char* found = strchr(regions_index,code);
if(found) return regions[found-regions_index];
else return unknownAsString ? "???" : NULL;
}

const char *MakerNameForMakerCode(u16 id, bool unknownAsString)
{
//too bad these aren't sorted
for (int i = 0; i < ARRAY_SIZE(makerCodes); i++)
}

const char *MakerNameForMakerCode(u16 id, bool unknownAsString)
{
//too bad these aren't sorted
for (size_t i = 0; i < ARRAY_SIZE(makerCodes); i++)
{
if (makerCodes[i].code == id)
return makerCodes[i].name;
}

return unknownAsString ? "Unknown" : NULL;
}
return unknownAsString ? "Unknown" : NULL;
}
}
Loading

0 comments on commit d3ae025

Please sign in to comment.