Coder Social home page Coder Social logo

Comments (9)

jtothebell avatar jtothebell commented on May 28, 2024 1

I think#ifdef _WIN32 works, but I'm not familiar with building C/C++ on windows either. But looking at libretro code and a couple other projects, that looks like the right thing to do. At present I don't have a windows machine to check, but I did get the libretro core building on windows at one point and I think what you have described sounds like what I did.

from fake-08.

bslenul avatar bslenul commented on May 28, 2024 1

Yep all good now, both Libretro and standalone!

Thank you! ❤️

from fake-08.

bslenul avatar bslenul commented on May 28, 2024

Should I send a PR or you want to test for yourself first and/or find a better alternative maybe?

from fake-08.

jtothebell avatar jtothebell commented on May 28, 2024

Found my old branch and pushed it. Does https://github.com/jtothebell/fake-08/tree/libretro-windows work for you? I got it building for someone else and they said it was working, but I don't know how thoroughly it was tested.

from fake-08.

bslenul avatar bslenul commented on May 28, 2024

#include <cstdint> (or <stdint.h>, idk the difference) required in this file: https://github.com/jtothebell/fake-08/blob/libretro-windows/platform/libretro/libretrohosthelpers.h but otherwise it builds and works fine for me now, yes 👍

edit: and putting that same #ifdef block inside https://github.com/jtothebell/fake-08/blob/libretro-windows/source/filehelpers.h let me build standalone as well, might want to add that too ;)

from fake-08.

jtothebell avatar jtothebell commented on May 28, 2024

Alright, I moved that #ifdef block to host.h since mkdir should only be getting called from host implementations, and that should work for both libretro builds and standalone builds. If that is working, I'll merge that change in.

from fake-08.

jtothebell avatar jtothebell commented on May 28, 2024

@bslenul Can you give me any more details about how you're building with MinGW for windows? I tried today to build the libretro core, and it builds fine, but crashes when I try to load a game (I don't see a smoking gun in the logs, but if I pepper some extra logging in it looks like its having trouble with the call to mkdir). I installed MSYS2 as recommended by the "Windows 7 and later compilation and development guide" in the libretro docs, then tried using MinGW-W64 and MinGW-W32 shells but the builds from both crash RetroArch.

The odd thing is that I have an old build from the branch I mentioned above on this same machine, and that one works still, but I can't remember what I might have done differently back then, so I was hoping you might be able to help. Thanks!

from fake-08.

bslenul avatar bslenul commented on May 28, 2024

I installed MSYS2 as recommended by the "Windows 7 and later compilation and development guide" in the libretro docs

Yeah I followed the same guide, then idk I didn't do anything special, just cd to platform/libretro/ then make and that's it.
Then in RetroArch: Main Menu > Load Content, select a .p8 file and it works just fine for me.

It seems to crash when loading the core without content however (so Main Menu > Load Core > FAKE-08 > Start Core), looks like it's because of info being NULL in retro_load_game(), it crashes here:

auto containingDir = getDirectory(info->path);

But in any case I don't seem to have any issue with mkdir anymore 🤔

from fake-08.

jtothebell avatar jtothebell commented on May 28, 2024

@bslenul Well, I'm still not sure what is wrong with that windows machine, but I tried it on someone else's and it worked fine, so I set up a CI build in github actions and that output also seems to be working. I also threw in a quick fix to that crash. It just loads the cart list cart, which isn't really useful as configured, but at least it doesn't crash.

from fake-08.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.