Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Core/Headers/Application.h

Diff revisions: vs.
  @@ -46,18 +46,33 @@
46 46 inline const vec2<U16>& getResolution() const {return _resolution;}
47 47 inline const vec2<U16>& getScreenCenter() const {return _screenCenter;}
48 48 inline const vec2<U16>& getPreviousResolution() const { return _prevResolution; }
49 - inline void setResolutionWidth(U16 w) { _prevResolution.set(_resolution); _resolution.width = w; _screenCenter.x = w / 2;}
50 - inline void setResolutionHeight(U16 h) { _prevResolution.set(_resolution); _resolution.height = h; _screenCenter.y = h / 2;}
51 - inline void setResolution(U16 w, U16 h) { _prevResolution.set(_resolution); _resolution.set(w,h); _screenCenter.set(_resolution / 2);}
49 +
50 + inline void setResolutionWidth(U16 w) {
51 + _prevResolution.set(_resolution);
52 + _resolution.width = w;
53 + _screenCenter.x = w / 2;
54 + }
55 +
56 + inline void setResolutionHeight(U16 h) {
57 + _prevResolution.set(_resolution);
58 + _resolution.height = h;
59 + _screenCenter.y = h / 2;
60 + }
61 +
62 + inline void setResolution(U16 w, U16 h) {
63 + _prevResolution.set(_resolution);
64 + _resolution.set(w,h);
65 + _screenCenter.set(_resolution / 2);
66 + }
52 67
53 68 inline void RequestShutdown() { _requestShutdown = true; }
54 69 inline void CancelShutdown() { _requestShutdown = false; }
55 70 inline bool ShutdownRequested() const { return _requestShutdown; }
56 71 inline Kernel* const getKernel() const { return _kernel; }
57 72
58 - inline const std::thread::id& getMainThreadId() const { return _threadId; }
59 - inline bool isMainThread() const { return (_threadId == std::this_thread::get_id()); }
60 - inline void setMemoryLogFile(const stringImpl& fileName) { _memLogBuffer = fileName; }
73 + inline const std::thread::id& getMainThreadId() const { return _threadId; }
74 + inline bool isMainThread() const { return (_threadId == std::this_thread::get_id()); }
75 + inline void setMemoryLogFile(const stringImpl& fileName) { _memLogBuffer = fileName; }
61 76
62 77 inline bool hasFocus() const { return _hasFocus; }
63 78 inline void hasFocus(const bool state) { _hasFocus = state; }
  @@ -80,7 +95,8 @@
80 95 inline void throwError(ErrorCode err) { _errorCode = err; }
81 96 inline ErrorCode errorCode() const { return _errorCode; }
82 97
83 - /// Add a list of callback functions that should be called when the application instance is destroyed (release hardware, file handlers, etc)
98 + /// Add a list of callback functions that should be called when the application instance is destroyed
99 + /// (release hardware, file handlers, etc)
84 100 inline void registerShutdownCallback( const DELEGATE_CBK<>& cbk ) {
85 101 _shutdownCallback.push_back( cbk );
86 102 }
  @@ -102,7 +118,7 @@
102 118 vec2<U16> _screenCenter;
103 119 vec2<U16> _prevResolution;
104 120 Kernel* _kernel;
105 - ///buffer to register all of the memory allocations recorded via "New"
121 + ///buffer to register all of the memory allocations recorded via "MemoryManager_NEW"
106 122 stringImpl _memLogBuffer;
107 123 ///Main application thread id
108 124 std::thread::id _threadId;