~registry/dolphin-emu/triforce

« back to all changes in this revision

Viewing changes to Source/Core/Core/Src/HW/DSPHLE/MailHandler.h

  • Committer: Sérgio Benjamim
  • Date: 2015-02-13 05:54:40 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20150213055440-ey2rt3sjpy27km78
Dolphin Triforce branch from code.google, commit b957980 (4.0-315).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2013 Dolphin Emulator Project
 
2
// Licensed under GPLv2
 
3
// Refer to the license.txt file included.
 
4
 
 
5
#ifndef _MAILHANDLER_H
 
6
#define _MAILHANDLER_H
 
7
 
 
8
#include <queue>
 
9
 
 
10
#include "Common.h"
 
11
#include "ChunkFile.h"
 
12
 
 
13
class CMailHandler
 
14
{
 
15
public:
 
16
        CMailHandler();
 
17
        ~CMailHandler();
 
18
 
 
19
        void PushMail(u32 _Mail);
 
20
        void Clear();
 
21
        void Halt(bool _Halt);
 
22
        void DoState(PointerWrap &p);
 
23
        bool IsEmpty();
 
24
 
 
25
        u16 ReadDSPMailboxHigh();
 
26
        u16 ReadDSPMailboxLow();
 
27
 
 
28
        u32 GetNextMail()
 
29
        { 
 
30
                if (m_Mails.size())
 
31
                {
 
32
                        return m_Mails.front();
 
33
                }
 
34
                else
 
35
                {
 
36
                        // WARN_LOG(DSPHLE, "GetNextMail: No mails");
 
37
                        return 0;
 
38
                }
 
39
        }
 
40
 
 
41
private:
 
42
        // mail handler
 
43
        std::queue<u32> m_Mails;
 
44
};
 
45
 
 
46
#endif
 
47