-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some features/fixes #6
Changes from 8 commits
6ea5fc9
bbba7ba
5b0366c
44c1ecc
850ad66
7a5487c
c5a1cc5
edc6620
d0afe72
fce76de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Net; | ||
using System.Runtime.Serialization; | ||
|
||
namespace CLRDEV9.Config | ||
{ | ||
[DataContract(Namespace = "http://schemas.datacontract.org/2004/07/CLRDEV9")] | ||
class ConfigLogging | ||
{ | ||
[DataMember] | ||
public bool Test = true; | ||
[DataMember] | ||
public bool DEV9 = true; | ||
[DataMember] | ||
public bool SPEED = true; | ||
[DataMember] | ||
public bool SMAP = true; | ||
[DataMember] | ||
public bool ATA = true; | ||
[DataMember] | ||
public bool Winsock = true; | ||
[DataMember] | ||
public bool NetAdapter = true; | ||
[DataMember] | ||
public bool UDPSession = true; | ||
[DataMember] | ||
public bool DNSPacket = true; | ||
[DataMember] | ||
public bool DNSSession = true; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using CLRDEV9; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the reference to CLRDEV9 as it's not needed. |
||
|
||
namespace PSE | ||
{ | ||
|
@@ -174,7 +175,8 @@ public static void Close() | |
|
||
public static void WriteLine(TraceEventType eType, int logSource, string str) | ||
{ | ||
if (sources == null) return; | ||
if (sources == null) | ||
return; | ||
if (sources.ContainsKey(logSource)) | ||
{ | ||
sources[logSource].TraceEvent(eType, logSource, str); | ||
|
@@ -189,6 +191,7 @@ public static void MsgBoxErrorTrapper(Exception e) | |
{ | ||
Console.Error.WriteLine(e.Message + Environment.NewLine + e.StackTrace); | ||
#if NETCOREAPP2_0 | ||
SDL2.MessageBox.Show(SDL2.MessageBoxFlags.Error, "Fatal Error", "Encounted Exception! : " + e.Message + Environment.NewLine + e.StackTrace); | ||
#else | ||
System.Windows.Forms.MessageBox.Show("Encounted Exception! : " + e.Message + Environment.NewLine + e.StackTrace); | ||
#endif | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.IO; | ||
|
||
namespace SDL2 | ||
{ | ||
enum MessageBoxFlags | ||
{ | ||
Error = 0x00000010, | ||
Warning = 0x00000020, | ||
Information = 0x00000040 | ||
} | ||
|
||
static class MessageBox | ||
{ | ||
[DllImport("SDL2")] | ||
private static extern int SDL_ShowSimpleMessageBox(uint flags, string title, string message, IntPtr window); | ||
|
||
public static int Show(MessageBoxFlags flags, string title, string message) | ||
{ | ||
return SDL_ShowSimpleMessageBox((uint)flags, title, message, new IntPtr(0)); | ||
} | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: Newline at end of file |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(clrdev9) | ||
|
||
add_library(${PROJECT_NAME} SHARED | ||
coreclrhost.h | ||
DEV9.h | ||
DEV9.cpp | ||
PSE.h | ||
PSE.cpp | ||
) | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32") | ||
target_link_libraries(${PROJECT_NAME} | ||
m | ||
rt | ||
dl | ||
pthread | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
#include <fcntl.h> | ||
#include <sys/types.h> | ||
#include <sys/stat.h> | ||
#include <pwd.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove reference if this is no-longer required. |
||
|
||
#include <set> | ||
#include <vector> | ||
|
@@ -303,8 +304,7 @@ void LoadCoreCLR(string pluginPath, string coreClrFolder) | |
|
||
if (coreClrFolder.length() == 0) | ||
{ | ||
//coreClrFolder = "/home/air/git/ReadyBin.Release"; | ||
coreClrFolder = "/home/air/git/ReadyBin.Debug"; | ||
coreClrFolder = PCSX2HomeDir + "/coreclr"; | ||
} | ||
|
||
string coreClrPath = coreClrFolder + "/" + "libcoreclr.so"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do ConfigLogging's defaults apply correctly when loading an older config file (that lacks the entry)?
I remember having issues relating to that in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If config file lacks the entry, it applies default values. (at least on my machine)
However, if you manually add required entries, it still applies default values until you let it recreate config file. (maybe I just did it in wrong order?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC the entries in the file have to be in a specific order for settings to be read. I'm only concerned about updating an old file, and that seems to work.