mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 17:11:23 +00:00
c37905e465
move module initialization into a module manager, still has some issues like stopping not working and debug crashing add #idef 0 to modules that aren't in the windows project don't double initialize and don't de-initialize for now, since many modules don't expect it and it leads to many errors remove duplicate module lists for empty modules and implemented ones, make Module non-copyable but movable add secondary project, no real use for it now add some memleak config to the emucore and add asmjit path to rpcs3 small rebase error fixed to get it to compile again add filters for emucore re-add the module manager and static file WIP commit, linker errors abound some more abstraction layer stuff fix the remaining linker errors, re-enable platform specific mouse, pad and keyboard handlers rebasing fix memset undefined and re() usage of se_t before declaration Add wxGUI define by default for cmake builds fix copy constructors of Datetime header fix copy constructors of other wx interface classes remove static declarations of global variables make wxGLCanvas constructor non-ambiguous even with wx2.8. compat mode, fix wrong std::exception constructor calls remove duplicate definition for FromUTF8 and ToUTF8 temp changes
103 lines
1.8 KiB
C++
103 lines
1.8 KiB
C++
#pragma once
|
|
|
|
extern std::string rDefaultDateTimeFormat;
|
|
|
|
|
|
struct rTimeSpan
|
|
{
|
|
rTimeSpan();
|
|
~rTimeSpan();
|
|
rTimeSpan(const rTimeSpan& other);
|
|
rTimeSpan(int, int, int, int);
|
|
|
|
void *handle;
|
|
};
|
|
|
|
struct rDateSpan
|
|
{
|
|
rDateSpan();
|
|
~rDateSpan();
|
|
rDateSpan(const rDateSpan& other);
|
|
rDateSpan(int, int, int, int);
|
|
|
|
void *handle;
|
|
};
|
|
|
|
struct rDateTime
|
|
{
|
|
enum TZ
|
|
{
|
|
Local, GMT0,UTC
|
|
};
|
|
enum Calender
|
|
{
|
|
Gregorian, Julian
|
|
};
|
|
|
|
using rTimeZone = TZ;
|
|
|
|
enum WeekDay
|
|
{
|
|
Sun = 0,
|
|
Mon,
|
|
Tue,
|
|
Wed,
|
|
Thu,
|
|
Fri,
|
|
Sat,
|
|
Inv_WeekDay
|
|
};
|
|
|
|
enum Month {
|
|
Jan = 0,
|
|
Feb = 1,
|
|
Mar = 2,
|
|
Apr = 3,
|
|
May = 4,
|
|
Jun = 5,
|
|
Jul = 6,
|
|
Aug = 7,
|
|
Sep = 8,
|
|
Oct = 9,
|
|
Nov = 10,
|
|
Dec = 11,
|
|
Inv_Month = 12
|
|
};
|
|
|
|
rDateTime();
|
|
~rDateTime();
|
|
rDateTime(const rDateTime& other);
|
|
rDateTime(const time_t &time);
|
|
rDateTime(u16 day, rDateTime::Month month, u16 year, u16 hour, u16 minute, u16 second, u32 millisecond);
|
|
|
|
static rDateTime UNow();
|
|
rDateTime FromUTC(bool val);
|
|
rDateTime ToUTC(bool val);
|
|
time_t GetTicks();
|
|
void Add(const rTimeSpan& span);
|
|
void Add(const rDateSpan& span);
|
|
void Close();
|
|
std::string Format(const std::string &format = rDefaultDateTimeFormat, const rTimeZone &tz = Local) const;
|
|
|
|
void ParseDateTime(const std::string & format);
|
|
|
|
u32 GetAsDOS();
|
|
rDateTime &SetFromDOS(u32 fromdos);
|
|
|
|
static bool IsLeapYear(int year, rDateTime::Calender cal);
|
|
static int GetNumberOfDays(rDateTime::Month month, int year, rDateTime::Calender cal);
|
|
void SetToWeekDay(rDateTime::WeekDay day, int n, rDateTime::Month month, int year);
|
|
int GetWeekDay();
|
|
|
|
u16 GetYear( rDateTime::TZ timezone);
|
|
u16 GetMonth(rDateTime::TZ timezone);
|
|
u16 GetDay(rDateTime::TZ timezone);
|
|
u16 GetHour(rDateTime::TZ timezone);
|
|
u16 GetMinute(rDateTime::TZ timezone);
|
|
u16 GetSecond(rDateTime::TZ timezone);
|
|
u32 GetMillisecond(rDateTime::TZ timezone);
|
|
|
|
void *handle;
|
|
};
|
|
|