Merge pull request #20 from georgemoralis/skmp/linux-fixes

Linux fixes
This commit is contained in:
georgemoralis 2023-07-07 14:00:44 +03:00 committed by GitHub
commit c7b593eba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 4 deletions

View File

@ -7,12 +7,24 @@
#include <sys/mman.h> #include <sys/mman.h>
#endif #endif
#if !defined(_WIN64)
enum PosixPageProtection
{
PAGE_NOACCESS = 0,
PAGE_READONLY = PROT_READ,
PAGE_READWRITE = PROT_READ | PROT_WRITE,
PAGE_EXECUTE = PROT_EXEC,
PAGE_EXECUTE_READ = PROT_EXEC | PROT_READ,
PAGE_EXECUTE_READWRITE = PROT_EXEC | PROT_READ | PROT_WRITE
};
#endif
#include "../Util/Log.h" #include "../Util/Log.h"
namespace Memory namespace Memory
{ {
namespace VirtualMemory { namespace VirtualMemory {
static DWORD convertMemoryMode(MemoryMode mode) static u32 convertMemoryMode(MemoryMode mode)
{ {
switch (mode) switch (mode)
{ {

View File

@ -5,7 +5,10 @@ namespace HLE::Libs::LibC {
static void init_env() //every game/demo should probably static void init_env() //every game/demo should probably
{ {
__debugbreak();//if we reach here it will be a great progress :D for(;;) {
printf("__debugbreak\n");
}
//__debugbreak();//if we reach here it will be a great progress :D
} }
void LibC_RegisterFunc(SymbolsResolver* sym) void LibC_RegisterFunc(SymbolsResolver* sym)

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "../Types.h" #include "../types.h"
namespace Lib { namespace Lib {
class Timer final class Timer final

View File

@ -33,7 +33,10 @@
// Main code // Main code
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
if (argc == 1) {
printf("Usage: %s <module path>\n", argv[0]);
return -1;
}
logging::init(true);//init logging logging::init(true);//init logging
const char* const path = argv[1]; //argument 1 is the path of self file to boot const char* const path = argv[1]; //argument 1 is the path of self file to boot